Пример #1
0
        public DbRepository(ILaptopListingSystemDbContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context", "An instance of ILaptopListingSystemDbContext is required to use this repository.");
            }

            this.Context = context;
            this.DbSet   = this.Context.Set <T>();
        }
Пример #2
0
        public LaptopListingSystemData(ILaptopListingSystemDbContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context", "An instance of ILaptopListingSystemDbContext is required.");
            }

            this.context      = context;
            this.repositories = new Dictionary <Type, object>();
        }
 public LaptopsRepository(ILaptopListingSystemDbContext context)
     : base(context)
 {
 }