/// <summary> /// Finishes initializing this instance. This method must be called after /// instantiating an instance of this class and before using any of its /// other methods. /// </summary> /// <param name="businessLogicData">The <see cref="IBusinessLogicData"/> for this model.</param> public void Initialize(IBusinessLogicData businessLogicData) { System.Diagnostics.Debug.Assert(businessLogicData != null, "BusinessLogicData cannot be null"); this._businessLogicData = businessLogicData; // Note: the LinqToSqlContext in this AppDomain is not the same // one in the caller's AppDomain, so we have to propagate this // override across to this version of the type. if (businessLogicData.LinqToSqlPath != null) { LinqToSqlContext.OverrideAssemblyPath(businessLogicData.LinqToSqlPath); } }
/// <summary> /// Creates a new instance /// </summary> /// <param name="context">The owning context</param> /// <param name="metaType">The metatype of the entity</param> public LinqToSqlEntity(LinqToSqlContext context, MetaType metaType) : base(context, metaType.Name, metaType.Type) { System.Diagnostics.Debug.Assert(metaType.IsEntity == true, "MetaType must be for an entity."); this._hasTimestampMember = metaType.VersionMember != null; }
/// <summary> /// Creates a new instance /// </summary> /// <param name="context">The owning context</param> /// <param name="metaType">The metatype of the entity</param> public LinqToSqlEntity(LinqToSqlContext context, MetaType metaType) : base(context, metaType.Name, metaType.Type) { System.Diagnostics.Debug.Assert(metaType.IsEntity == true, "MetaType must be for an entity."); this._hasTimestampMember = metaType.VersionMember != null; }