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

            this.Context = context;
            this.DbSet   = this.Context.Set <T>();
        }
Пример #2
0
 public DeletableEntityRepository(IBabyDevDbContext context)
     : base(context)
 {
 }
Пример #3
0
 public BabyDevData(IBabyDevDbContext context)
 {
     this.context      = context;
     this.repositories = new Dictionary <Type, object>();
 }