Click here to Skip to main content
15,895,740 members
Articles / Programming Languages / C#

Test Driving NHibernate 3.0, LINQ and the Entity Framework CTP 5 with the Abstract Factory Design Pattern

Rate me:
Please Sign up or sign in to vote.
4.89/5 (18 votes)
2 Apr 2011CPOL12 min read 229.4K   1.7K   53  
Developing an N-Tier application with C#
/*----------------------------------------------------------
The base color for this template is #5c87b2. If you'd like
to use a different color start by replacing all instances of
#5c87b2 with your new color.
----------------------------------------------------------*/


html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td
{
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    font-weight: inherit;
    font-style: inherit;
    font-size: inherit;
    font-family: inherit;
    vertical-align: baseline;
}


body
{
    background: #f1f1f1;
    font-size: 0.7em;
    font-family: sans-serif, "Helvetica";
    -webkit-text-size-adjust: none;
}


a:link
{
    color: #597eaa;
    text-decoration: none;
}
a:visited
{
    color: #597eaa;
}
a:hover
{
    color: #499afb;
    text-decoration: none;
}
a:active
{
    color: #597eaa;
}

p, ul
{
    margin-bottom: 1px;
    line-height: 1.6em;
}

/* HEADINGS   
----------------------------------------------------------*/
h1, h2, h3, h4, h5, h6
{
    font-size: 1.5em;
    color: #000; /*  font-family: Arial, Helvetica, sans-serif;*/
}

h1
{
    font-size: 2em;
    padding-bottom: 0;
    margin-bottom: 0;
}
h2
{
    padding: 0 0 10px 0;
}
h3
{
    font-size: 1.2em;
}
h4
{
    font-size: 1.1em;
}
h5, h6
{
    font-size: 1em;
}

/* this rule styles <h2> tags that are the 
first child of the left and right table columns */
.rightColumn > h1, .rightColumn > h2, .leftColumn > h1, .leftColumn > h2
{
    margin-top: 0;
}

/* PRIMARY LAYOUT ELEMENTS   
----------------------------------------------------------*/

/* you can specify a greater or lesser percentage for the 
page width. Or, you can specify an exact pixel width. */
.page
{
    margin: 0 5px 5px 5px;
    padding: 8px;
}

#header
{
    /*position: relative;*/
    margin-bottom: 0px;
    color: #000;
    padding: 0;
}

#header h1
{
    font-weight: bold;
    padding: 0;
    margin: 0;
    color: #fff;
    border: none;
    line-height: 2em; /* font-family: Arial, Helvetica, sans-serif;*/
    font-size: 32px !important;
}

.Logo
{
    width: 30%;
    float: left;
}
.LoginView
{
    width: 60%;
    float: right;
    text-align: right;
    color:#000;
}

.Pad
{
    background-color: #fff;
    border: 2px solid #ddd;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    margin-top:5px;
}

.Box
{ padding:10px;

    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;

}

.Header
{ margin:5px 0 5px 0;padding:5px;

    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;

}

.Border td{ border:solid 1px #e1e1e1;}

.round
{
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
}

.MainBlue
{
    background-color: #597eaa;
    color: #fff;
}

.LightBlue
{
    background-color: #e8eef4;
    color: #333;
}
.LightRed
{
    background-color: #f4e7e7;
    color: #333;
}

.Red
{
    background-color: #c43d3d;
    color: #fff;
}

.Orange
{
    background-color: #c4963d;
    color: #fff;
}

.LightOrange
{
    background-color: #f4f1e7;
    color: #333;
}
.LightGrey
{
    background-color: #e1e1e1;
    color: #333;
    border:solid 1px #ccc;
}

.LightestGrey
{
    background-color: #f1f1f1;
    color: #333;
    border:solid 1px #e1e1e1;
}






.FloatLeft{width: 90%; float: left;}
.FloatRight{width: 10%; float: right; text-align:right;}





.user
{
    padding: 5px 0px 5px 20px;
    margin: 0px 0px 5px 0px;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    background-color: #e1e1e1;
    width: 100%;
}

#main
{
    padding: 0px 0px 0px 0px;
    background-color: #f1f1f1;
    margin-bottom: 0px;
    _height: 1px; /* only IE6 applies CSS properties starting with an underscrore */
}


#footer
{
    color: #999;
    padding: 10px 0;
    text-align: right;
    line-height: normal;
    margin: 0;
    font-size: .9em;
}



#footer ul
{
    margin: 0 0 7px 0;
    text-align: right;
}

#footer ul li
{
    display: inline;
    list-style: none; 
}





.DoctorHeader, .UserHeader, .ClinicHeader, .AbnormalHeader, .CriticalHeader, .PatientsHeader, .OrdersHeader, .ReportHeader, .TestHeader

{
    color: #333;
    background-color: #e1e1e1;
    border: solid 1px #ccc;
    padding: 4px 10px 0px 35px;
    margin:0 0 5px 0;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    background-repeat: no-repeat;
    background-position: left center;
    font-weight:bold; height:20px;

}


.DoctorHeader{background-image: url(../Images/Icon_doctor.png);}
.UserHeader{background-image: url(../Images/Icon_user.png);}
.ClinicHeader{background-image: url(../Images/Icon_clinic.png);}
.AbnormalHeader{background-image: url(../Images/Icon_abnormal.png);}
.CriticalHeader{background-image: url(../Images/Icon_critical.png);}
.PatientsHeader{background-image: url(../Images/Icon_user.png);}
.OrdersHeader{background-image: url(../Images/Icon_orders.png);}
.ReportHeader{background-image: url(../Images/Icon_report.png);}
.TestHeader{background-image: url(../Images/Icon_test.png);}

#DoctorFilter option{width:100%; height:25px;}

.Search

{

    background-image: url(../Images/Icon_search.png);
    background-repeat: no-repeat;
    background-position: right center;
    


}

.btnSmall
{
    display: inline-block;
    padding: 3px 7px 3px 7px;
    font-size: 9px;
    text-shadow: 1px 1px 1px #535353;
    border: 1px solid rgba(0,0,0,0.4);
    -moz-border-radius: 5px;
    -moz-box-shadow: 0px 0px 2px rgba(0,0,0,0.5);
    -webkit-border-radius: 5px;
    -webkit-box-shadow: 0px 0px 2px rgba(0,0,0,0.5);
    cursor: hand; color:#fff;
}

.buttons
{
    padding: 10px 5px 5px 0px;   
}

.btn
{
    display: inline-block;
    padding: 5px 7px 6px 7px;
    font-weight: bold;
    font-size: 11px;
    border: 1px solid rgba(0,0,0,0.4);
    -moz-border-radius: 5px;
    -moz-box-shadow: 0px 0px 2px rgba(0,0,0,0.5);
    -webkit-border-radius: 5px;
    -webkit-box-shadow: 0px 0px 2px rgba(0,0,0,0.5);
    cursor: hand; color:#fff;
}

.btn:link, .btn:visited, .btn:hover,.btn:active,.btnSmall:link, .btnSmall:visited, .btnSmall:hover,.btnSmall:active
{
    color: #fff;
    text-decoration: none;
}

.blueBtn
{
    background-color: #597eaa;
    color: #ffffff;cursor: hand;
}
.blueBtn:hover
{
    background-color: #499afb;
    color: #ffffff;
}

.greenBtn
{
    background-color: #CCCCCC;
    color: #141414;
}
.greenBtn:hover
{
    background-color: #8aff00;
    color: #ffffff;
}

.redBtn
{
    background-color: #CCCCCC;
    color: #141414;
}
.redBtn:hover
{
    background-color: #ff004e;
    color: #ffffff;
}



.TableHeader td
{
}

.HeaderTable td
{
    background-color: #597eaa;
    color: #fff;
    font-weight: bold;
}
.HeaderTable, .HeaderTable td, .DataTable, .DataTable td
{
    border: none;
}
.DataTable td
{
    border-bottom: solid 1px #e1e1e1;
}
.DataTable td table tr
{
    background-color: #f1f1f1;
}


/* TAB MENU   
----------------------------------------------------------*/
ul#menu
{
    border-bottom: 0px #5C87B2 solid; 
    padding: 5px 0 0px 20px;
    position: relative;
    margin: 0;
    text-align: left;
}

ul#menu li
{
    display: inline;
    list-style: none;
}

ul#menu li#greeting
{
    padding: 10px 20px;
    font-weight: bold;
    text-decoration: none;
    line-height: 2.8em;
    color: #fff;
}

ul#menu li a
{
    padding: 10px 20px;
    font-weight: bold;
    text-decoration: none;
    line-height: 2.8em;
    background-color: #e8eef4;
    color: #034af3;
}

ul#menu li a:hover
{
    background-color: #fff;
    text-decoration: none;
}

ul#menu li a:active
{
    background-color: #a6e2a6;
    text-decoration: none;
}

ul#menu li.selected a
{
    background-color: #fff;
    color: #000;
}


/* TAB SUBMENU 
----------------------------------------------------------*/
#menuTable 
{
background-color: #D3DCE5;
}
#SubMenuTable
{
border-color:#D3DCE5;
border: 0px;
background-color: #D3DCE5;
}
#SubMenuTable table
{
background-color: #D3DCE5;
border: 0px;
}
#SubMenuTable tr
{

}
#SubMenuTable td
{
border: 0px;
background-color: #D3DCE5;
}
#SubMenuTable a:link
{
color: black;
text-decoration: underline;
}
#SubMenuTable a:visited
{
color: black;
text-decoration: underline;
}
#SubMenuTable a:hover
{
color: black;
text-decoration: none;
}





/* FORM LAYOUT ELEMENTS   
----------------------------------------------------------*/

fieldset
{
    margin: 10px 10px 1px 1px;
    border: 1px solid #CCC;
    padding: 10px 10px 1px 1px;
    width: 90%;
}

fieldset p
{
    margin: 5px 10px 5px 5px;
}

fieldset label
{
    display: block;
}

fieldset label.inline
{
    display: inline;
}

legend
{
    font-size: 1.1em;
    font-weight: 600;
    padding: 5px 5px 5px 5px;
}

input[type="text"], input[type="password"]
{
    padding: 0px 0px 0px 5px;
    border: 1px solid #bbb; 
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    height:20px;
}



/* TABLE
----------------------------------------------------------*/

table
{
    border: 0px;
    border-collapse: collapse;   
    font-size:1em;
}

table td
{
    padding: 5px;
    border: solid 0px #e1e1e1;
}

table th
{
    padding: 6px 5px;
    text-align: left;
    background-color: #e1e1e1;
    border: solid 1px #d7d7d7;
    border-bottom:none;
}


table tfoot tr td
{
    background-color: #f1f1f1;
}


.ClearTable
{
     border:none; padding:0; margin:0;

    
    }

/* MISC  
----------------------------------------------------------*/

.criticalsView, .abnormalsView, .patientsView, .ordersView, .doctorView, .clinicView
{
    height: 100px;
}

.p5
{
    padding: 5px;
}
.p10
{
    padding: 10px;
}
li
{
    list-style: none;
}
.11px
{
    font-size: 15px;
}

h1
{
    font-size: 1.3em;
    font-weight: bold;
    padding: 5px 0 5px 0;
}
span
{
    font-weight: bold;
}

.clear
{
    clear: both;
}

.error
{
    color: Red;
}

.errorMessage
{
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    color: #333;
}


div#title
{
    display: block;
    float: left;
    text-align: left;
}

#logindisplay
{
    font-size: 1.1em;
    display: block;
    text-align: left;
    margin: 10px;
    color: White;
}

#logindisplay a:link
{
    color: white;
    text-decoration: underline;
}

#logindisplay a:visited
{
    color: white;
    text-decoration: underline;
}

#logindisplay a:hover
{
    color: white;
    text-decoration: none;
}

.selectDoctor a:link
{
    color: red;
    text-decoration: none;
}

.selectDoctor a:visited
{
    color: red;
    text-decoration: none;
}

.selectDoctor a:hover
{
    color: red;
    text-decoration: none;
}

.field-validation-error
{
    color: #ff0000;
}

.input-validation-error
{    
    background-color: #ffeeee;   
    border: 1px solid #d19090; 
}

.validation-summary-errors
{
    color: #ff0000;
    background-color: #fcd9d9;
    border: solid 1px #ff0000;
    padding: 5px 10px 5px 35px;
    margin-top: 10px;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    background-image: url(../Images/Icon_exclamation.png);
    background-repeat: no-repeat;
    background-position: left center;
}

.C999
{
    color: #999;
}


.mb5
{
    margin-bottom: 5px;
}

.mt5
{
    margin-top: 5px;
}


/* Top Menu  
----------------------------------------------------------*/
#TopMenu ul{display: block;list-style-type: none;margin:0;}
#TopMenu ul li{display: inline-block;line-height: 1;padding: 10px 5px 10px 5px;}
#TopMenu ul li:hover{background-color: #fff;color: black;}
.TopTab, .TopTabActive, .TopTabSelected,.TopTabSelectedAb,.TopTabSelectedCr,.TopTabSelectedPa,.TopTabSelectedOr{-moz-border-radius: 4px;-webkit-border-radius: 4px;}
.TopTabActive{background-color: #d3d3d3;}
.TopTabSelected{background-color: #fff;}
.TopTab a:link, .TopTabActive a:link, .TopTabSelected a:link{text-decoration: none;}

.TopTabSelectedAb{background-color: #c4963d; color:#fff;}
.TopTabSelectedCr{background-color: #c43d3d; color:#fff;}
.TopTabSelectedPa{background-color: #597eaa; color:#fff;}
.TopTabSelectedOr{background-color: green; color:#fff;}

/* Login page   
----------------------------------------------------------*/
#LoginForm label{font-weight:bold; font-size:1.2em;}
#LoginForm input[type="text"],#LoginForm input[type="password"]{font-size:1.2em; margin:5px 0 10px 0;width:100%;}
#LoginForm input[type="submit"]{padding:10px 20px;}
#LoginForm p{margin-bottom:20px;}
/*----------------------------------------------------------*/
#SelectButtons ul {border-top: solid 1px #d1d1d1;}
#SelectButtons ul li{border-bottom: solid 1px #d1d1d1;}
#SelectButtons ul li input{padding:20px 7px 20px 15px; border:0; background-color:#dfe3e8; background-image: url(../Images/Icon_LeftArrow.png); background-repeat:no-repeat; background-position:center right ;width:100%; text-align:left; font-size: 1.3em; font-weight:bold;}
#SelectButtons ul li input:hover{background-color:#597eaa; color:#fff;}
/*----------------------------------------------------------*/
.MT10{margin-top:10px;}
.MB10{margin-bottom:10px;}

/*-PAGER-----------------------------------------------*/

.Pager{
    padding: 0px;
    margin: 10px;

}
.Pager ul{}
.Pager ul li{ 
    display: inline-block;
    padding: 3px 7px 3px 7px;
    font-size: 1em;
    font-weight:bold;
    border: 1px solid rgba(0,0,0,0.1);
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    cursor: hand;
    background-color:#e8eef4; text-decoration:none;
}

.Pager ul li{}
.Pager ul li:link{color:#ccc; text-decoration:none;}
.Pager ul li:hover{ background-color:#fff;}

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 Joey Software Solutions
United States United States
Mark Caplin has specialized in Information Technology solutions for the past 30 years. Specializing in full life-cycle development projects for both enterprise-wide systems and Internet/Intranet based solutions.

For the past fifteen years, Mark has specialized in the Microsoft .NET framework using C# as his tool of choice. For the past four years Mark has been implementing Single Page Applications using the Angular platform.

When not coding, Mark enjoys playing tennis, listening to U2 music, watching Miami Dolphins football and watching movies in Blu-Ray technology.

In between all this, his wife of over 25 years, feeds him well with some great home cooked meals.

You can contact Mark at mark.caplin@gmail.com

...

Comments and Discussions