コード例 #1
0
		/// <summary>
		/// Initialize a new NorthwindEntities object with an audit modifier.
		/// </summary>
		public NorthwindEntities(ContextStartup contextStartup, string connectionString) :
			base(Util.ConvertNormalCS2EF(connectionString, contextStartup.CurrentPlatform), "NorthwindEntities")
		{
			_contextStartup = contextStartup;
			this.CurrentPlatform = contextStartup.CurrentPlatform;
			this.ContextOptions.LazyLoadingEnabled = contextStartup.AllowLazyLoading;
			this.CommandTimeout = contextStartup.CommandTimeout;
			this.OnContextCreated();
		}
コード例 #2
0
		/// <summary>
		/// Initialize a new NorthwindEntities object with an audit modifier.
		/// </summary>
		public NorthwindEntities(ContextStartup contextStartup) :
			base(Util.ConvertNormalCS2EFFromConfig("name=NorthwindEntities", contextStartup.CurrentPlatform), "NorthwindEntities")
		{
			_contextStartup = contextStartup;
			this.CurrentPlatform = contextStartup.CurrentPlatform;
			this.ContextOptions.LazyLoadingEnabled = contextStartup.AllowLazyLoading;
			this.CommandTimeout = contextStartup.CommandTimeout;
			this.OnContextCreated();
		}