예제 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Repository{T}"/> class.
 /// </summary>
 /// <param name="context">Context of database.</param>
 public Repository(PayingSystemDataBaseContext context)
 {
     if (DataSet == null)
     {
         DataSet = context.Set <T>();
     }
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UnitOfWork"/> class.
 /// </summary>
 /// <param name="context">Database context.</param>
 public UnitOfWork(PayingSystemDataBaseContext context)
 {
     Context               = context;
     AccountRepository     = new AccountRepository(context);
     ClientRepository      = new ClientRepository(context);
     AddressRepository     = new AddressRepository(context);
     ShopRepository        = new ShopRepository(context);
     ProductListRepository = new ProductListRepository(context);
     ProductRepository     = new ProductRepository(context);
 }
예제 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AddressRepository"/> class.
 /// </summary>
 /// <param name="context">Database context.</param>
 public AddressRepository(PayingSystemDataBaseContext context)
     : base(context)
 {
 }
예제 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ClientRepository"/> class.
 /// </summary>
 /// <param name="context">Database context.</param>
 public ClientRepository(PayingSystemDataBaseContext context)
     : base(context)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ProductRepository"/> class.
 /// </summary>
 /// <param name="context">Database context.</param>
 public ProductRepository(PayingSystemDataBaseContext context)
     : base(context)
 {
 }
예제 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ShopRepository"/> class.
 /// </summary>
 /// <param name="context">Database context.</param>
 public ShopRepository(PayingSystemDataBaseContext context)
     : base(context)
 {
 }