Exemplo n.º 1
0
 public IEnumerable <Vendor> Get()
 {
     using (OnlineShopDBContext db = new OnlineShopDBContext())
     {
         return(db.Vendors.ToList());
     }
 }
 public UnitOfWork(OnlineShopDBContext context)
 {
     _context     = context;
     Customers    = new CustomerRepository(_context);
     Items        = new ItemRepository(_context);
     UOMs         = new UOMRepository(_context);
     Orders       = new OrderRepository(_context);
     OrderDetails = new OrderDetailsRepository(_context);
 }
Exemplo n.º 3
0
        private void DbContextSeed(OnlineShopDBContext context, int retry = 0)
        {
            int retryForAvaiability = retry;

            try
            {
                CreateProductCategorySample(context);
            }
            catch (Exception)
            {
                if (retryForAvaiability < 10)
                {
                    retryForAvaiability++;

                    DbContextSeed(context, retryForAvaiability);
                }
            }
        }
Exemplo n.º 4
0
 public OrderDetailDao()
 {
     db = new OnlineShopDBContext();
 }
Exemplo n.º 5
0
 public Repository(OnlineShopDBContext context)
 {
     _context = context;
 }
 public ProductRepository(OnlineShopDBContext context) : base(context)
 {
 }
Exemplo n.º 7
0
 public ProductDao()
 {
     dbContext = new OnlineShopDBContext();
 }
Exemplo n.º 8
0
 public ApplicationUserStore(OnlineShopDBContext context)
     : base(context)
 {
 }
Exemplo n.º 9
0
 public ContentDao()
 {
     dbContext = new OnlineShopDBContext();
 }
Exemplo n.º 10
0
 public ProductCategoryDAO()
 {
     db = new OnlineShopDBContext();
 }
Exemplo n.º 11
0
 public DetailDao()
 {
     dbContext = new OnlineShopDBContext();
 }
Exemplo n.º 12
0
 public MenuDao()
 {
     db = new OnlineShopDBContext();
 }
Exemplo n.º 13
0
 public ItemRepository(OnlineShopDBContext context) : base(context)
 {
 }
Exemplo n.º 14
0
 public ChangStatus()
 {
     db = new OnlineShopDBContext();
 }
 public OrderDetailsRepository(OnlineShopDBContext context) : base(context)
 {
 }
Exemplo n.º 16
0
 public BrandDao()
 {
     dbContext = new OnlineShopDBContext();
 }
Exemplo n.º 17
0
 //Create Constructor
 public ProductDAO()
 {
     db = new OnlineShopDBContext();
 }
Exemplo n.º 18
0
 public ContactDao()
 {
     db = new OnlineShopDBContext();
 }
Exemplo n.º 19
0
 public UserDao()
 {
     db = new OnlineShopDBContext();
 }
Exemplo n.º 20
0
 public FooterDao()
 {
     db = new OnlineShopDBContext();
 }
 public CustomerRepository(OnlineShopDBContext context) : base(context)
 {
 }
Exemplo n.º 22
0
 public CategoryModel()
 {
     context = new OnlineShopDBContext();
 }
Exemplo n.º 23
0
 public SlideDao()
 {
     db = new OnlineShopDBContext();
 }
Exemplo n.º 24
0
 public AccountModel()
 {
     context = new OnlineShopDBContext();
 }
Exemplo n.º 25
0
 public OnlineShopDBContext Init()
 {
     return(dbContext ?? (dbContext = new OnlineShopDBContext()));
 }
Exemplo n.º 26
0
 public CategoryDao()
 {
     db = new OnlineShopDBContext();
 }
Exemplo n.º 27
0
 public OrderDao()
 {
     dbContext = new OnlineShopDBContext();
 }
Exemplo n.º 28
0
 public ContentDAO()
 {
     db = new OnlineShopDBContext();
 }
Exemplo n.º 29
0
 public ProductCategoryDao()
 {
     dbContext = new OnlineShopDBContext();
 }