Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Repository{T}"/> class.
 /// </summary>
 /// <param name="context">The context<see cref="GBSampleContext"/></param>
 public Repository(GBSampleContext context)
 {
     this.context = context;
     entities     = context.Set <T>();
 }
 public ReviewRepository(GBSampleContext context) : base(context)
 {
     entity = context.Set <Review>();
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UnitOfWork"/> class.
 /// </summary>
 /// <param name="context">The context<see cref="GBSampleContext"/></param>
 public UnitOfWork(GBSampleContext context)
 {
     _context = context;
 }
Пример #4
0
 public AuthorRepository(GBSampleContext context) : base(context)
 {
     entity = context.Set <Author>();
 }
Пример #5
0
 public BookRepository(GBSampleContext context) : base(context)
 {
     entity = context.Set <Book>();
 }