/// <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>();
 }
Beispiel #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;
 }
Beispiel #4
0
 public AuthorRepository(GBSampleContext context) : base(context)
 {
     entity = context.Set <Author>();
 }
 public BookRepository(GBSampleContext context) : base(context)
 {
     entity = context.Set <Book>();
 }