예제 #1
0
 public UnitOfWork(string connectionString)
 {
     _context      = new ApContext(connectionString);
     Itemss        = new ItemRepository(_context);
     Orders        = new OrderRepository(_context);
     ClientManager = new ClientManager(_context);
     RoleManager   = new AppRoleManager(new RoleStore <AppRole>(_context));
     UserManager   = new AppUserManager(new UserStore <User>(_context));
     ShoppingCart  = new CartRepository(_context);
 }
예제 #2
0
 public CartRepository(ApContext context) : base(context)
 {
 }
예제 #3
0
 public ItemRepository(ApContext context) : base(context)
 {
 }
예제 #4
0
 public OrderRepository(ApContext context) : base(context)
 {
 }
예제 #5
0
 public Repository(ApContext app)
 {
     context = app;
 }
예제 #6
0
 public ClientManager(ApContext db)
 {
     DB = db;
 }