/// <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>(); } }
/// <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); }
/// <summary> /// Initializes a new instance of the <see cref="AddressRepository"/> class. /// </summary> /// <param name="context">Database context.</param> public AddressRepository(PayingSystemDataBaseContext context) : base(context) { }
/// <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) { }
/// <summary> /// Initializes a new instance of the <see cref="ShopRepository"/> class. /// </summary> /// <param name="context">Database context.</param> public ShopRepository(PayingSystemDataBaseContext context) : base(context) { }