Пример #1
0
 public List <console.Models.btl_ProductPrice> GetAllPrices()
 {
     using (var context = new console.Models.dream_techContext())
     {
         return(context.btl_ProductPrice.Where(t => t.price_id > 0).ToList());
     }
 }
Пример #2
0
 public tbl_DelivetyAddresses GetDAddress(tbl_DelivetyAddresses address)
 {
     using (var context = new console.Models.dream_techContext())
     {
         return((from d in context.tbl_DelivetyAddresses where d.delivery_id == address.delivery_id select d).SingleOrDefault());
     }
 }
Пример #3
0
 public tblProductCategory GetCategory(int id)
 {
     using (var context = new console.Models.dream_techContext())
     {
         return((from c in context.tblProductCategories where c.category_id == id select c).SingleOrDefault());
     }
 }
Пример #4
0
 public tblProduct GetProduct(int id)
 {
     using (var context = new console.Models.dream_techContext())
     {
         return((from p in context.tblProducts where p.product_id == id select p).SingleOrDefault());
     }
 }
Пример #5
0
 public List <console.Models.tbl_DelivetyAddresses> GetAllDAddress()
 {
     using (var context = new console.Models.dream_techContext())
     {
         return(context.tbl_DelivetyAddresses.Where(t => t.delivery_id > 0).ToList());
     }
 }
Пример #6
0
 public tbl_DeliveryOptions GetDOption(int id)
 {
     using (var context = new console.Models.dream_techContext())
     {
         return((from d in context.tbl_DeliveryOptions where d.delivery_id == id select d).SingleOrDefault());
     }
 }
Пример #7
0
 public List <console.Models.tblProduct> GetAllProducts()
 {
     using (var context = new console.Models.dream_techContext())
     {
         return(context.tblProducts.Include("tblProductCategory").Include("btl_ProductPrice").Where(t => t.product_id > 0).ToList());
     }
 }
Пример #8
0
 public tblFeaturedProduct GetFeaturedProd(int id)
 {
     using (var context = new console.Models.dream_techContext())
     {
         return((from f in context.tblFeaturedProducts where f.feature_id == id select f).SingleOrDefault());
     }
 }
Пример #9
0
 public List <console.Models.tblFeaturedProduct> GetAllActiveFeaturedProducts()
 {
     using (var context = new console.Models.dream_techContext())
     {
         return(context.tblFeaturedProducts.Where(t => t.active == true).ToList());
     }
 }
Пример #10
0
 public tbl_Cart GetCart(string reference)
 {
     using (var context = new console.Models.dream_techContext())
     {
         return((from c in context.tbl_Cart where c.cart_ref == reference select c).SingleOrDefault());
     }
 }
Пример #11
0
 public btl_ProductPrice GetPrice(int id)
 {
     using (var context = new console.Models.dream_techContext())
     {
         return((from p in context.btl_ProductPrice where p.price_id == id select p).SingleOrDefault());
     }
 }
Пример #12
0
 public tbl_BillingAddress GetBAddress(tbl_BillingAddress address)
 {
     using (var context = new console.Models.dream_techContext())
     {
         return((from t in context.tbl_BillingAddress where t.billing_id == address.billing_id select t).SingleOrDefault());
     }
 }
Пример #13
0
 public tbl_User GetLoginDetails(string email, string password)
 {
     using (var context = new console.Models.dream_techContext())
     {
         return((from t in context.tbl_User where t.email_address == email && t.password == password select t).SingleOrDefault());
     }
 }
Пример #14
0
 public List <console.Models.tbl_User> GetAllUsers()
 {
     using (var context = new console.Models.dream_techContext())
     {
         return(context.tbl_User.Where(t => t.user_id > 0).ToList());
     }
 }
Пример #15
0
 public tbl_User GetUser(string email)
 {
     using (var context = new console.Models.dream_techContext())
     {
         return((from t in context.tbl_User where t.email_address == email select t).SingleOrDefault());
     }
 }
Пример #16
0
 public List <console.Models.tbl_Wishlist> GetAllWishlists()
 {
     using (var context = new console.Models.dream_techContext())
     {
         return(context.tbl_Wishlist.Where(t => t.wishlist_id > 0).ToList());
     }
 }
Пример #17
0
 public tbl_WishlistItem GetWishlistItem(int id)
 {
     using (var context = new console.Models.dream_techContext())
     {
         return((from w in context.tbl_WishlistItem where w.wishlist_item_id == id select w).SingleOrDefault());
     }
 }
Пример #18
0
 public List <console.Models.tbl_OptIn> GetAllOpts()
 {
     using (var context = new console.Models.dream_techContext())
     {
         return(context.tbl_OptIn.Where(t => t.opt_id > 0).ToList());
     }
 }
Пример #19
0
 public tbl_OptIn GetOpt(int id)
 {
     using (var context = new console.Models.dream_techContext())
     {
         return((from o in context.tbl_OptIn where o.opt_id == id select o).SingleOrDefault());
     }
 }
Пример #20
0
 public tbl_CartItem GetCartItem(string refernce, int id)
 {
     using (var context = new console.Models.dream_techContext())
     {
         return((from c in context.tbl_CartItem where (c.cart_ref == refernce) where (c.product_id == id) select c).SingleOrDefault());
     }
 }
Пример #21
0
 public List <console.Models.tbl_BillingAddress> GetAllBAddresses()
 {
     using (var context = new console.Models.dream_techContext())
     {
         return(context.tbl_BillingAddress.Where(t => t.billing_id > 0).ToList());
     }
 }
Пример #22
0
 public tbl_CustomerContact GetContact(int id)
 {
     using (var context = new console.Models.dream_techContext())
     {
         return((from c in context.tbl_CustomerContact where c.contact_id == id select c).SingleOrDefault());
     }
 }
Пример #23
0
 public List <console.Models.tbl_CartItem> GetAllCartItems()
 {
     using (var context = new console.Models.dream_techContext())
     {
         return(context.tbl_CartItem.Where(t => t.cart_item_id > 0).ToList());
     }
 }
Пример #24
0
 public List <console.Models.tbl_CustomerContact> GetAllContacts()
 {
     using (var context = new console.Models.dream_techContext())
     {
         return(context.tbl_CustomerContact.Where(t => t.contact_id > 0).ToList());
     }
 }
Пример #25
0
 public tbl_PromoCode GetPromoById(int id)
 {
     using (var context = new console.Models.dream_techContext())
     {
         return((from t in context.tbl_PromoCode where t.promo_id == id select t).SingleOrDefault());
     }
 }
Пример #26
0
 public tbl_OrderStatus GetStatus(int id)
 {
     using (var context = new console.Models.dream_techContext())
     {
         return((from s in context.tbl_OrderStatus where s.status_id == id select s).SingleOrDefault());
     }
 }
Пример #27
0
 public tbl_User GetUserById(int id)
 {
     using (var context = new console.Models.dream_techContext())
     {
         return((from t in context.tbl_User where t.user_id == id select t).SingleOrDefault());
     }
 }
Пример #28
0
 public List <console.Models.tblCountry> GetAllCountries()
 {
     using (var context = new console.Models.dream_techContext())
     {
         return(context.tblCountries.Where(t => t.country_id > 0).ToList());
     }
 }
Пример #29
0
 public List <console.Models.tbl_OrderStatus> GetAllOrderStatuses()
 {
     using (var context = new console.Models.dream_techContext())
     {
         return(context.tbl_OrderStatus.Where(t => t.status_id > 0).ToList());
     }
 }
Пример #30
0
 public List <btl_ProductPrice> GetMultiplePrices(List <int> priceId)
 {
     using (var context = new console.Models.dream_techContext())
     {
         var price = context.btl_ProductPrice.Where(p => priceId.Contains(p.price_id)).ToList();
         return(price);
     }
 }