Click here to Skip to main content
15,891,529 members
Articles / Web Development / ASP.NET

NHibernate and MySQL - A simple example

Rate me:
Please Sign up or sign in to vote.
4.19/5 (14 votes)
16 Oct 2008CPOL10 min read 146.5K   5.1K   43  
A short article with an example of how you can use NHibernate and MyQL together.
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace WebApp1
{
    public class SiteUrl
    {
        private int urlid;
        public virtual int UrlId
        {
            get { return urlid; }
            set { urlid = value; }
        }

        private int siteid;
        public virtual int SiteId
        {
            get { return siteid; }
            set { siteid = value; }
        }

        private string url;
        public virtual string Url
        {
            get { return url; }
            set { url = value; }
        }

        public SiteUrl()
        {
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer Nolior HB
Sweden Sweden
I've been working as a developer since 1997 and started out with AS400, DB2 and RPG and have since then "evolved" into using a variety of languages such as Java, PHP, C++, C#, ASP, PL/SQL and more.

http://orbitalcoding.nolior.se

Comments and Discussions