This project is read-only.

beerhouse_35_CS_version61392_SiteMapEntities

Topics: Developer Forum, User Forum
Jun 5, 2010 at 8:29 PM

Hello I downloaded the 3.5 C# version 61392. I am running this on a local server with SQLExpress2008 and visual studio 2008 sp1.

Has anyone tested the C# version successfully for version 61392?

Does anyone know how to fix this error?

I am very interested in this project and want to learn. Any help is appreciated. thank you.

 

Server Error in '/BeerHouse35' Application.

The specified default EntityContainer name 'SiteMapEntities' could not be found in the mapping and metadata information.
Parameter name: defaultContainerName

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: The specified default EntityContainer name 'SiteMapEntities' could not be found in the mapping and metadata information.
Parameter name: defaultContainerName

Source Error:

Line 32:         /// Initialize a new SiteMapEntities object.
Line 33:         /// </summary>
Line 34:         public SiteMapEntities(string connectionString) : 
Line 35:                 base(connectionString, "SiteMapEntities")
Line 36:         {


Source File: C:\TheBeerHouse_61392_35_CS\TheBeerHouse_35_CS\TBHBLL\Navigation\SiteMapModel.Designer.cs    Line: 34

Stack Trace:

[ArgumentException: The specified default EntityContainer name 'SiteMapEntities' could not be found in the mapping and metadata information.
Parameter name: defaultContainerName]
   System.Data.Metadata.Edm.ClrPerspective.SetDefaultContainer(String defaultContainerName) +2976390
   System.Data.Objects.ObjectContext.set_DefaultContainerName(String value) +31
   System.Data.Objects.ObjectContext..ctor(String connectionString, String defaultContainerName) +40
   BLL.SiteMapEntities..ctor(String connectionString) in C:\TheBeerHouse_61392_35_CS\TheBeerHouse_35_CS\TBHBLL\Navigation\SiteMapModel.Designer.cs:34
   BLL.SiteMapRepository.get_SiteMapctx() in C:\TheBeerHouse_61392_35_CS\TheBeerHouse_35_CS\TBHBLL\Navigation\SiteMapRepository.cs:23
   BLL.SiteMapRepository.GetSiteMapInfoByURL(String URL) in C:\TheBeerHouse_61392_35_CS\TheBeerHouse_35_CS\TBHBLL\Navigation\SiteMapRepository.cs:137
   TheBeerHouse.URLRewrite.Rewrite(HttpApplication app) in C:\TheBeerHouse_61392_35_CS\TheBeerHouse_35_CS\TBHBLL\Modules\URLRewrite.cs:56
   TheBeerHouse.URLRewrite.BeginRequest(Object sender, EventArgs e) in C:\TheBeerHouse_61392_35_CS\TheBeerHouse_35_CS\TBHBLL\Modules\URLRewrite.cs:39
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75



Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3601

Jun 6, 2010 at 1:33 PM

My best guess is your web site does not have the Entity Meta connectionstring in the configuration based on this thread, http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/173a70c7-4220-44fe-b42f-1ba8f721489d/ This makes sense based on what I remember from when I was first working with EF. The connection string EF uses needs to be in the web site's web.config, not the dll. I am not really sure why the EF wizard adds the app.config to the dll project if you were relying on using that one. I never gets used when your application is being used. So if you have that app.config copy the conecctionstring from it to your web site's app.config.

Jun 6, 2010 at 8:31 PM

Hello Docluv,

I did as you suggested and copied the connection strings into the web.config file. It still gives me the exact same error message.

I feel like I am missing something with the setup of your solution.

I unzipped to my C:\

Attached your database to my SQLEXPRESS 2008 and confirmed that I can connect through Visual Studio 2008 SP1

I edited the connection strings in the Web.Config in TheBeerHouse35\ and in the app.config in the TBHBLL\

Is there anything else I need to check on? Here is my Web.Config, App.Config, and SiteMapModel.Designer.cs files.
If you get the chance I would really appreciate you taking a look. I really want to get this working so I can learn from your solution. Thanks.

Web.Config in the TheBeerHouse35\

	<appSettings />
	<connectionStrings>
		<add name="TheBeerHouseEntities" connectionString="metadata=res://*;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.\SQLEXPRESS2008;AttachDbFilename=C:\TheBeerHouse_61392_35_CS\Database\BHEFCSDB.MDF;Integrated Security=True;Connect Timeout=30;User Instance=True&quot;" providerName="System.Data.EntityClient" />
      <add name="ASPNETDBConnectionString" connectionString="Data Source=.\SQLEXPRESS2008;AttachDbFilename=C:\TheBeerHouse_61392_35_CS\Database\BHEFCSDB.MDF;Integrated Security=True;Connect Timeout=30;User Instance=True" providerName="System.Data.SqlClient" />
      <add name="ArticlesEntities" connectionString="metadata=res://*/Navigation.SiteMapModel.csdl|res://*/Navigation.SiteMapModel.ssdl|res://*/Navigation.SiteMapModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.\SQLEXPRESS2008;AttachDbFilename=C:\TheBeerHouse_61392_35_CS\Database\BHEFCSDB.MDF;Integrated Security=True;Connect Timeout=30;User Instance=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
      <add name="ShoppingEntities" connectionString="metadata=res://*/Store.ShoppingModel.csdl|res://*/Store.ShoppingModel.ssdl|res://*/Store.ShoppingModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.\SQLEXPRESS2008;AttachDbFilename=C:\TheBeerHouse_61392_35_CS\Database\BHEFCSDB.MDF;Integrated Security=True;Connect Timeout=30;User Instance=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
      <add name="GalleryEntities" connectionString="metadata=res://*/Gallery.GalleryModel.csdl|res://*/Gallery.GalleryModel.ssdl|res://*/Gallery.GalleryModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.\SQLEXPRESS2008;AttachDbFilename=C:\TheBeerHouse_61392_35_CS\Database\BHEFCSDB.MDF;Integrated Security=True;Connect Timeout=30;User Instance=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
      <add name="SiteMapEntities" connectionString="metadata=res://*/Navigation.SiteMapModel.csdl|res://*/Navigation.SiteMapModel.ssdl|res://*/Navigation.SiteMapModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.\SQLEXPRESS;AttachDbFilename=C:\TheBeerHouse_61392_35_CS\Database\BHEFCSDB.MDF;Integrated Security=True;Connect Timeout=30;User Instance=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
   </connectionStrings>
	<system.web>
		<siteMap defaultProvider="TBHSiteMapProvider" enabled="true">
			<providers>
				<add name="TBHSiteMapProvider" type="TBHSiteMapProvider" securityTrimmingEnabled="true" />
			</providers>
		</siteMap>
		<!-- 
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.

            Visual Basic options:
            Set strict="true" to disallow all data type conversions 
            where data loss can occur. 
            Set explicit="true" to force declaration of all variables.
        -->
		<compilation debug="true" defaultLanguage="c#" explicit="true" strict="false">
			<assemblies>
				<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
				<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
				<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
				<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
				<add assembly="System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
				<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
				<add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
				<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
				<add assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
			</assemblies>
		</compilation>
		<pages theme="DarkBeer" masterPageFile="~/TBHMain.master" maintainScrollPositionOnPostBack="true">
			<namespaces>
				<clear />
				<add namespace="TheBeerHouse" />
				<add namespace="TheBeerHouse.Web.UI" />
				<add namespace="TheBeerHouse.BLL" />
				<add namespace="System" />
				<add namespace="System.Collections" />
				<add namespace="System.Collections.Generic" />
				<add namespace="System.Collections.Specialized" />
				<add namespace="System.Configuration" />
				<add namespace="System.Text" />
				<add namespace="System.Text.RegularExpressions" />
				<add namespace="System.Linq" />
				<add namespace="System.Xml.Linq" />
				<add namespace="System.Web" />
				<add namespace="System.Web.Caching" />
				<add namespace="System.Web.SessionState" />
				<add namespace="System.Web.Security" />
				<add namespace="System.Web.Profile" />
				<add namespace="System.Web.UI" />
				<add namespace="System.Web.UI.WebControls" />
				<add namespace="System.Web.UI.WebControls.WebParts" />
				<add namespace="System.Web.UI.HtmlControls" />
				<add namespace="AjaxControlToolkit" />
			</namespaces>
			<!--http://weblogs.asp.net/scottgu/archive/2006/11/26/tip-trick-how-to-register-user-controls-and-custom-controls-in-web-config.aspx-->
			<controls>
				<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
				<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
				<add tagPrefix="asp" namespace="AjaxControlToolkit" assembly="AjaxControlToolkit, Version=3.0.20820.19518, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" />
				<add tagPrefix="asp" namespace="TheBeerHouse.Web.UI" assembly="TBHBLL, Version=3.5.0.1, Culture=neutral, PublicKeyToken=null" />
				<add tagPrefix="FCKeditorV2" namespace="FredCK.FCKeditorV2" assembly="FredCK.FCKeditorV2" />
				<add tagPrefix="uc1" src="~/controls/UserProfile.ascx" tagName="UserProfile" />
				<add tagPrefix="uc1" src="~/controls/PollBox.ascx" tagName="PollBox" />
				<add tagPrefix="uc1" src="~/controls/ShoppingCartBox.ascx" tagName="ShoppingCartBox" />
				<add tagPrefix="uc1" src="~/controls/Featuredproduct.ascx" tagName="Featuredproduct" />
				<add tagPrefix="uc1" src="~/controls/NewsletterBox.ascx" tagName="NewsletterBox" />
				<add tagPrefix="uc1" src="~/controls/FooterCopyright.ascx" tagName="FooterCopyright" />
				
			</controls>
		</pages>
		<!--
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
        -->
		<authentication mode="Forms">
			<forms cookieless="AutoDetect" loginUrl="~/AccessDenied.aspx" name="TBHFORMAUTH" />
		</authentication>
		<!--
            The <customErrors> section enables configuration 
            of what to do if/when an unhandled error occurs 
            during the execution of a request. Specifically, 
            it enables developers to configure html error pages 
            to be displayed in place of a error stack trace.
        -->
		<!--
		<sessionState mode="Custom" customProvider="SessionStoreProvider" timeout="20">
			<providers>
				<add name="SessionStoreProvider" type="System.Data.Caching.SessionStoreProvider, ClientLibrary"/>
			</providers>
		</sessionState>
-->
		<trace pageOutput="false" enabled="false" />
      <roleManager enabled="true" cacheRolesInCookie="true" cookieName="TBHROLES" defaultProvider="TBH_RoleProvider">
         <providers>
            <add connectionStringName="ASPNETDBConnectionString" applicationName="/" name="TBH_RoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
         </providers>
      </roleManager>
      <webParts enableExport="true">
         <personalization defaultProvider="TBH_PersonalizationProvider">
            <providers>
               <add name="TBH_PersonalizationProvider" connectionStringName="ASPNETDBConnectionString" type="System.Web.UI.WebControls.WebParts.SqlPersonalizationProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
            </providers>

            <authorization>
					<allow roles="Administrators,Editors" verbs="enterSharedScope" />
				</authorization>
			</personalization>
		</webParts>
		<machineKey validationKey="287C5D125D6B7E7223E1F719E3D58D17BB967703017E1BBE28618FAC6C4501E910C7E59800B5D4C2EDD5B0ED98874A3E952D60BAF260D9D374A74C76CB741803" decryptionKey="5C1D8BD9DF3E1B4E1D01132F234266616E0D5EF772FE80AB" validation="SHA1" />
		<customErrors mode="RemoteOnly" defaultRedirect="~/Error.aspx">
			<error statusCode="404" redirect="~/GenericError.aspx?code=404" />
			<error statusCode="408" redirect="~/GenericError.aspx?code=408" />
			<error statusCode="505" redirect="~/GenericError.aspx?code=505" />
		</customErrors>
		<urlMappings>
			<add url="~/articles/beer.aspx" mappedUrl="~/BrowseArticles.aspx?CatID=28" />
			<add url="~/articles/events.aspx" mappedUrl="~/BrowseArticles.aspx?CatID=41" />
			<add url="~/articles/news.aspx" mappedUrl="~/BrowseArticles.aspx?CatID=31" />
			<add url="~/articles/photos.aspx" mappedUrl="~/BrowseArticles.aspx?CatID=40" />
			<add url="~/articles/blog.aspx" mappedUrl="~/BrowseArticles.aspx?CatID=29" />
			<add url="~/articles/faq.aspx" mappedUrl="~/BrowseArticles.aspx?CatID=42" />
		</urlMappings>
		<httpHandlers>
			<remove verb="*" path="*.asmx" />
			<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
			<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
			<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />
			<add verb="*" path="forum.rss" validate="false" type="RSSForum, TBHBLL, Version=3.5.0.1, Culture=neutral, PublicKeyToken=null" />
			<add verb="*" path="Products.rss" validate="false" type="ProductsRSS, TBHBLL, Version=3.5.0.1, Culture=neutral, PublicKeyToken=null" />
			<add verb="*" path="*.rss" validate="false" type="TheBeerHouse.RSSFeed, TBHBLL, Version=3.5.0.1, Culture=neutral, PublicKeyToken=null" />
			<add verb="*" path="*.ics" validate="false" type="vCalHandler, TBHBLL, Version=3.5.0.1, Culture=neutral, PublicKeyToken=null" />
			<add verb="GET" path="sitemap.xml" validate="false" type="TBHBLL.Navigation.SiteMapsHandler, TBHBLL, Version=3.5.0.1, Culture=neutral, PublicKeyToken=null" />
			<!-- 
                This entry provides the UI for the error log at
                elmah.axd below the application path. For example,
                if your domain is www.example.com and your application
                is at the root, then you can view the error log by
                visiting the following URL:
                
                http://www.example.com/elmah.axd
                
                IMPORTANT! To secure this location, consult the
                following notes:
                
                http://code.google.com/p/elmah/wiki/SecuringErrorLogPages
            -->
			<add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" />
		</httpHandlers>
		<httpModules>
			<remove name="WindowsAuthentication" />
			<remove name="PassportAuthentication" />
			<add name="URLRewrite" type="TheBeerHouse.URLRewrite, TBHBLL, Version=3.5.0.1, Culture=neutral, PublicKeyToken=null" />
			<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
			<!-- 
                Uncomment the entries below if error mail reporting 
                and filtering is desired.
            -->
			<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" />
			<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" />
			<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
		</httpModules>
		<anonymousIdentification cookieless="AutoDetect" enabled="true" />
		<profile defaultProvider="TBH_ProfileProvider">
			<providers>
				<add name="TBH_ProfileProvider" connectionStringName="ASPNETDBConnectionString" applicationName="/" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
			</providers>
			<properties>
				<add name="FirstName" type="String" />
				<add name="LastName" type="String" />
				<add name="Gender" type="String" />
				<add name="BirthDate" type="DateTime" />
				<add name="Occupation" type="String" />
				<add name="Website" type="String" />
				<add name="ShoppingCart" type="TheBeerHouse.Store.ShoppingCart" serializeAs="Binary" allowAnonymous="true" />
				<group name="Forum">
					<add name="Posts" type="Int32" />
					<add name="AvatarUrl" type="String" />
					<add name="Signature" type="String" />
				</group>
				<group name="Address">
					<add name="Street" type="String" />
					<add name="PostalCode" type="String" />
					<add name="City" type="String" />
					<add name="State" type="String" />
					<add name="Country" type="String" />
				</group>
				<group name="Contacts">
					<add name="Phone" type="String" />
					<add name="Fax" type="String" />
				</group>
				<group name="Preferences">
					<add name="Theme" type="String" allowAnonymous="true" />
					<add name="Culture" type="String" defaultValue="en-US" />
					<add name="Newsletter" type="BLL.Newsletters.SubscriptionType" />
				</group>
			</properties>
		</profile>
		<membership defaultProvider="TBH_MembershipProvider" userIsOnlineTimeWindow="15">
			<providers>
            <add name="TBH_MembershipProvider" connectionStringName="ASPNETDBConnectionString" applicationName="/" enablePasswordRetrieval="true" enablePasswordReset="true" requiresQuestionAndAnswer="true" requiresUniqueEmail="true" passwordFormat="Encrypted" maxInvalidPasswordAttempts="5" passwordAttemptWindow="10" minRequiredPasswordLength="5" minRequiredNonalphanumericCharacters="0" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
            <!--
            <add name="TBH_MembershipProviderEx"
					connectionStringName="LocalSqlServer"
					applicationName="/"
					enablePasswordRetrieval="true"
					enablePasswordReset="true"
					requiresQuestionAndAnswer="true"
					requiresUniqueEmail="true"
					passwordFormat="Encrypted"
					maxInvalidPasswordAttempts="5"
					passwordAttemptWindow="10"
					minRequiredPasswordLength="5"
					minRequiredNonalphanumericCharacters="0"
					type="MB.TheBeerHouse.DAL.SqlClient.SqlMembershipProviderEx, __code"
            />
            -->
			</providers>
		</membership>
Jun 6, 2010 at 8:33 PM

post continued . . .
App.Config from TBHBLL\

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <connectionStrings>
     <add name="ArticlesEntities" connectionString="metadata=res://*/Navigation.SiteMapModel.csdl|res://*/Navigation.SiteMapModel.ssdl|res://*/Navigation.SiteMapModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.\SQLEXPRESS2008;AttachDbFilename=C:\TheBeerHouse_61392_35_CS\Database\BHEFCSDB.MDF;Integrated Security=True;Connect Timeout=30;User Instance=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
     <add name="ShoppingEntities" connectionString="metadata=res://*/Store.ShoppingModel.csdl|res://*/Store.ShoppingModel.ssdl|res://*/Store.ShoppingModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.\SQLEXPRESS2008;AttachDbFilename=C:\TheBeerHouse_61392_35_CS\Database\BHEFCSDB.MDF;Integrated Security=True;Connect Timeout=30;User Instance=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
     <add name="GalleryEntities" connectionString="metadata=res://*/Gallery.GalleryModel.csdl|res://*/Gallery.GalleryModel.ssdl|res://*/Gallery.GalleryModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.\SQLEXPRESS2008;AttachDbFilename=C:\TheBeerHouse_61392_35_CS\Database\BHEFCSDB.MDF;Integrated Security=True;Connect Timeout=30;User Instance=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
     <add name="SiteMapEntities" connectionString="metadata=res://*/Navigation.SiteMapModel.csdl|res://*/Navigation.SiteMapModel.ssdl|res://*/Navigation.SiteMapModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.\SQLEXPRESS;AttachDbFilename=C:\TheBeerHouse_61392_35_CS\Database\BHEFCSDB.MDF;Integrated Security=True;Connect Timeout=30;User Instance=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" /> 
  </connectionStrings>
</configuration>
SiteMapModel.Designer.cs
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50727.4918
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

[assembly: global::System.Data.Objects.DataClasses.EdmSchemaAttribute()]

// Original file name:
// Generation date: 8/17/2009 5:30:57 AM
namespace BLL
{
    
    /// <summary>
    /// There are no comments for SiteMapEntities in the schema.
    /// </summary>
    public partial class SiteMapEntities : global::System.Data.Objects.ObjectContext
    {
        /// <summary>
        /// Initializes a new SiteMapEntities object using the connection string found in the 'SiteMapEntities' section of the application configuration file.
        /// </summary>
        public SiteMapEntities() : 
                base("name=SiteMapEntities", "SiteMapEntities")
        {
            this.OnContextCreated();
        }
        /// <summary>
        /// Initialize a new SiteMapEntities object.
        /// </summary>
        public SiteMapEntities(string connectionString) : 
                base(connectionString, "SiteMapEntities")
        {
            this.OnContextCreated();
        }
        /// <summary>
        /// Initialize a new SiteMapEntities object.
        /// </summary>
        public SiteMapEntities(global::System.Data.EntityClient.EntityConnection connection) : 
                base(connection, "SiteMapEntities")
        {
            this.OnContextCreated();
        }
        partial void OnContextCreated();
        /// <summary>
        /// There are no comments for SiteMapInfos in the schema.
        /// </summary>
        public global::System.Data.Objects.ObjectQuery<SiteMapInfo> SiteMapInfos
        {
            get
            {
                if ((this._SiteMapInfos == null))
                {
                    this._SiteMapInfos = base.CreateQuery<SiteMapInfo>("[SiteMapInfos]");
                }
                return this._SiteMapInfos;
            }
        }
        private global::System.Data.Objects.ObjectQuery<SiteMapInfo> _SiteMapInfos;
        /// <summary>
        /// There are no comments for SiteMapInfos in the schema.
        /// </summary>
        public void AddToSiteMapInfos(SiteMapInfo siteMapInfo)
        {
            base.AddObject("SiteMapInfos", siteMapInfo);
        }
    }
    /// <summary>
    /// There are no comments for SiteMapEntities.SiteMapInfo in the schema.
    /// </summary>
    /// <KeyProperties>
    /// SiteMapId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="SiteMapEntities", Name="SiteMapInfo")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class SiteMapInfo : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new SiteMapInfo object.
        /// </summary>
        /// <param name="siteMapId">Initial value of SiteMapId.</param>
        /// <param name="uRL">Initial value of URL.</param>
        /// <param name="realURL">Initial value of RealURL.</param>
        /// <param name="title">Initial value of Title.</param>
        /// <param name="keywords">Initial value of Keywords.</param>
        /// <param name="description">Initial value of Description.</param>
        /// <param name="parent">Initial value of Parent.</param>
        /// <param name="uRLId">Initial value of URLId.</param>
        /// <param name="nodeType">Initial value of NodeType.</param>
        /// <param name="sortOrder">Initial value of SortOrder.</param>
        /// <param name="active">Initial value of Active.</param>
        /// <param name="dateAdded">Initial value of DateAdded.</param>
        /// <param name="addedBy">Initial value of AddedBy.</param>
        /// <param name="dateUpdated">Initial value of DateUpdated.</param>
        /// <param name="updatedBy">Initial value of UpdatedBy.</param>
        public static SiteMapInfo CreateSiteMapInfo(int siteMapId, string uRL, string realURL, string title, string keywords, string description, int parent, int uRLId, int nodeType, int sortOrder, bool active, global::System.DateTime dateAdded, string addedBy, global::System.DateTime dateUpdated, string updatedBy)
        {
            SiteMapInfo siteMapInfo = new SiteMapInfo();
            siteMapInfo.SiteMapId = siteMapId;
            siteMapInfo.URL = uRL;
            siteMapInfo.RealURL = realURL;
            siteMapInfo.Title = title;
            siteMapInfo.Keywords = keywords;
            siteMapInfo.Description = description;
            siteMapInfo.Parent = parent;
            siteMapInfo.URLId = uRLId;
            siteMapInfo.NodeType = nodeType;
            siteMapInfo.SortOrder = sortOrder;
            siteMapInfo.Active = active;
            siteMapInfo.DateAdded = dateAdded;
            siteMapInfo.AddedBy = addedBy;
            siteMapInfo.DateUpdated = dateUpdated;
            siteMapInfo.UpdatedBy = updatedBy;
            return siteMapInfo;
        }
        /// <summary>
        /// There are no comments for Property SiteMapId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public int SiteMapId
        {
            get
            {
                return this._SiteMapId;
            }
            set
            {
                this.OnSiteMapIdChanging(value);
                this.ReportPropertyChanging("SiteMapId");
                this._SiteMapId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SiteMapId");
                this.OnSiteMapIdChanged();
            }
        }
        private int _SiteMapId;
        partial void OnSiteMapIdChanging(int value);
        partial void OnSiteMapIdChanged();
        /// <summary>
        /// There are no comments for Property URL in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public string URL
        {
            get
            {
                return this._URL;
            }
            set
            {
                this.OnURLChanging(value);
                this.ReportPropertyChanging("URL");
                this._URL = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("URL");
                this.OnURLChanged();
            }
        }
        private string _URL;
        partial void OnURLChanging(string value);
        partial void OnURLChanged();
        /// <summary>
        /// There are no comments for Property RealURL in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public string RealURL
        {
            get
            {
                return this._RealURL;
            }
            set
            {
                this.OnRealURLChanging(value);
                this.ReportPropertyChanging("RealURL");
                this._RealURL = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("RealURL");
                this.OnRealURLChanged();
            }
        }
        private string _RealURL;
        partial void OnRealURLChanging(string value);
        partial void OnRealURLChanged();
        /// <summary>
        /// There are no comments for Property Title in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public string Title
        {
            get
            {
                return this._Title;
            }
            set
            {
                this.OnTitleChanging(value);
                this.ReportPropertyChanging("Title");
                this._Title = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Title");
                this.OnTitleChanged();
            }
        }
        private string _Title;
        partial void OnTitleChanging(string value);
        partial void OnTitleChanged();
        /// <summary>
        /// There are no comments for Property Keywords in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public string Keywords
        {
            get
            {
                return this._Keywords;
            }
            set
            {
                this.OnKeywordsChanging(value);
                this.ReportPropertyChanging("Keywords");
                this._Keywords = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Keywords");
                this.OnKeywordsChanged();
            }
        }
        private string _Keywords;
        partial void OnKeywordsChanging(string value);
        partial void OnKeywordsChanged();
        /// <summary>
        /// There are no comments for Property Description in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public string Description
        {
            get
            {
                return this._Description;
            }
            set
            {
                this.OnDescriptionChanging(value);
                this.ReportPropertyChanging("Description");
                this._Description = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Description");
                this.OnDescriptionChanged();
            }
        }
        private string _Description;
        partial void OnDescriptionChanging(string value);
        partial void OnDescriptionChanged();
        /// <summary>
        /// There are no comments for Property Roles in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public string Roles
        {
            get
            {
                return this._Roles;
            }
            set
            {
                this.OnRolesChanging(value);
                this.ReportPropertyChanging("Roles");
                this._Roles = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("Roles");
                this.OnRolesChanged();
            }
        }
        private string _Roles;
        partial void OnRolesChanging(string value);
        partial void OnRolesChanged();
        /// <summary>
        /// There are no comments for Property Parent in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public int Parent
        {
            get
            {
                return this._Parent;
            }
            set
            {
                this.OnParentChanging(value);
                this.ReportPropertyChanging("Parent");
                this._Parent = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Parent");
                this.OnParentChanged();
            }
        }
        private int _Parent;
        partial void OnParentChanging(int value);
        partial void OnParentChanged();
        /// <summary>
        /// There are no comments for Property URLId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public int URLId
        {
            get
            {
                return this._URLId;
            }
            set
            {
                this.OnURLIdChanging(value);
                this.ReportPropertyChanging("URLId");
                this._URLId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("URLId");
                this.OnURLIdChanged();
            }
        }
        private int _URLId;
        partial void OnURLIdChanging(int value);
        partial void OnURLIdChanged();
        /// <summary>
        /// There are no comments for Property URLType in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public string URLType
        {
            get
            {
                return this._URLType;
            }
            set
            {
                this.OnURLTypeChanging(value);
                this.ReportPropertyChanging("URLType");
                this._URLType = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("URLType");
                this.OnURLTypeChanged();
            }
        }
        private string _URLType;
        partial void OnURLTypeChanging(string value);
        partial void OnURLTypeChanged();
        /// <summary>
        /// There are no comments for Property NodeType in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public int NodeType
        {
            get
            {
                return this._NodeType;
            }
            set
            {
                this.OnNodeTypeChanging(value);
                this.ReportPropertyChanging("NodeType");
                this._NodeType = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("NodeType");
                this.OnNodeTypeChanged();
            }
        }
        private int _NodeType;
        partial void OnNodeTypeChanging(int value);
        partial void OnNodeTypeChanged();
        /// <summary>
        /// There are no comments for Property SortOrder in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public int SortOrder
        {
            get
            {
                return this._SortOrder;
            }
            set
            {
                this.OnSortOrderChanging(value);
                this.ReportPropertyChanging("SortOrder");
                this._SortOrder = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SortOrder");
                this.OnSortOrderChanged();
            }
        }
        private int _SortOrder;
        partial void OnSortOrderChanging(int value);
        partial void OnSortOrderChanged();
        /// <summary>
        /// There are no comments for Property Active in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public bool Active
        {
            get
            {
                return this._Active;
            }
            set
            {
                this.OnActiveChanging(value);
                this.ReportPropertyChanging("Active");
                this._Active = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Active");
                this.OnActiveChanged();
            }
        }
        private bool _Active;
        partial void OnActiveChanging(bool value);
        partial void OnActiveChanged();
        /// <summary>
        /// There are no comments for Property DateAdded in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.DateTime DateAdded
        {
            get
            {
                return this._DateAdded;
            }
            set
            {
                this.OnDateAddedChanging(value);
                this.ReportPropertyChanging("DateAdded");
                this._DateAdded = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("DateAdded");
                this.OnDateAddedChanged();
            }
        }
        private global::System.DateTime _DateAdded;
        partial void OnDateAddedChanging(global::System.DateTime value);
        partial void OnDateAddedChanged();
        /// <summary>
        /// There are no comments for Property AddedBy in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public string AddedBy
        {
            get
            {
                return this._AddedBy;
            }
            set
            {
                this.OnAddedByChanging(value);
                this.ReportPropertyChanging("AddedBy");
                this._AddedBy = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("AddedBy");
                this.OnAddedByChanged();
            }
        }
        private string _AddedBy;
        partial void OnAddedByChanging(string value);
        partial void OnAddedByChanged();
        /// <summary>
        /// There are no comments for Property DateUpdated in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.DateTime DateUpdated
        {
            get
            {
                return this._DateUpdated;
            }
            set
            {
                this.OnDateUpdatedChanging(value);
                this.ReportPropertyChanging("DateUpdated");
                this._DateUpdated = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("DateUpdated");
                this.OnDateUpdatedChanged();
            }
        }
        private global::System.DateTime _DateUpdated;
        partial void OnDateUpdatedChanging(global::System.DateTime value);
        partial void OnDateUpdatedChanged();
        /// <summary>
        /// There are no comments for Property UpdatedBy in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public string UpdatedBy
        {
            get
            {
                return this._UpdatedBy;
            }
            set
            {
                this.OnUpdatedByChanging(value);
                this.ReportPropertyChanging("UpdatedBy");
                this._UpdatedBy = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("UpdatedBy");
                this.OnUpdatedByChanged();
            }
        }
        private string _UpdatedBy;
        partial void OnUpdatedByChanging(string value);
        partial void OnUpdatedByChanged();
    }
}