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()); } }
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()); } }
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()); } }
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()); } }
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()); } }
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()); } }
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()); } }
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()); } }
public List <console.Models.tblFeaturedProduct> GetAllActiveFeaturedProducts() { using (var context = new console.Models.dream_techContext()) { return(context.tblFeaturedProducts.Where(t => t.active == true).ToList()); } }
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()); } }
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()); } }
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()); } }
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()); } }
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()); } }
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()); } }
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()); } }
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()); } }
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()); } }
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()); } }
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()); } }
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()); } }
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()); } }
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()); } }
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()); } }
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()); } }
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()); } }
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()); } }
public List <console.Models.tblCountry> GetAllCountries() { using (var context = new console.Models.dream_techContext()) { return(context.tblCountries.Where(t => t.country_id > 0).ToList()); } }
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()); } }
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); } }