/// <summary> /// Initializes a new instance of the <see cref="MemoryRepository"/> class. /// </summary> /// <param name="mappingSourceManager"> /// The mapping source manager. /// </param> public MemoryRepository(IMappingSourceManager mappingSourceManager) : this() { if (mappingSourceManager == null) { throw new ArgumentNullException("mappingSourceManager"); } this.MappingSource = mappingSourceManager.MappingSource; }
/// <summary> /// Initializes a new instance of the <see cref="LinqToSqlRepository"/> class. /// </summary> /// <param name="connectionManager"> /// The sql connection manager. /// </param> /// <param name="mappingSourceManager"> /// The mapping source manager. /// </param> public LinqToSqlRepository(ISqlConnectionManager connectionManager, IMappingSourceManager mappingSourceManager) { this.ConnectionManager = connectionManager; this.MappingSourceManager = mappingSourceManager; this.CreatedDataContexts = new List <WeakReference>(); }