Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Repository{T}"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 public Repository(MedicationDbContext context)
 {
     this.context  = context;
     this.entities = context.Set <T>();
 }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UnitOfWork"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 public UnitOfWork(MedicationDbContext context)
 {
     UnitOfWork.context = context;
 }