public GenericRepository(ILibrarySystemDbContext context)
        {
            Guard.WhenArgument(context, "An instance of DbContext is required to use this repository.").IsNull().Throw();

            this.Context = context;
            this.DbSet   = this.Context.Set <T>();
        }
Пример #2
0
        public UnitOfWork(ILibrarySystemDbContext context)
        {
            Guard.WhenArgument(context, "DbContext can not be null.").IsNull().Throw();

            this.context = context;
        }