//Create public Order Insert(Order order) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { ctx.Order.Add(order); ctx.SaveChanges(); return(this); } }
//Create public CPAStage Insert(CPAStage cpastage) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { ctx.CPAStage.Add(cpastage); ctx.SaveChanges(); return this; } }
//Create public Category Insert(Category category) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { ctx.Category.Add(category); ctx.SaveChanges(); return(this); } }
//Create public Category Insert(Category category) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { ctx.Category.Add(category); ctx.SaveChanges(); return this; } }
//Create public Order Insert(Order order) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { ctx.Order.Add(order); ctx.SaveChanges(); return this; } }
//Create public CPAStage Insert(CPAStage cpastage) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { ctx.CPAStage.Add(cpastage); ctx.SaveChanges(); return(this); } }
//Create public CPA Insert(CPA cpa) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { ctx.CPA.Add(cpa); ctx.SaveChanges(); return this; } }
//Create public CartItem Insert(CartItem cartitem) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { ctx.CartItem.Add(cartitem); ctx.SaveChanges(); return(this); } }
//Create public Item Insert(Item item) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { ctx.Item.Add(item); ctx.SaveChanges(); return(this); } }
//Create public AppUser Insert(AppUser appuser) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { ctx.AppUser.Add(appuser); ctx.SaveChanges(); return(this); } }
//Create public AppUser Insert(AppUser appuser) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { ctx.AppUser.Add(appuser); ctx.SaveChanges(); return this; } }
//Create public Item Insert(Item item) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { ctx.Item.Add(item); ctx.SaveChanges(); return this; } }
//Create public CPA Insert(CPA cpa) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { ctx.CPA.Add(cpa); ctx.SaveChanges(); return(this); } }
//Update public CPAStage Update(CPAStage cpastage) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { CPAStage CPAStage = ctx.CPAStage.First(x => x.CPAStageID == this.CPAStageID); CPAStage = cpastage; ctx.SaveChanges(); return CPAStage; } }
//Update public Category Update(Category category) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { Category Category = ctx.Category.First(x => x.CategoryID == this.CategoryID); Category = category; ctx.SaveChanges(); return(Category); } }
//Update public CartItem Update(CartItem cartitem) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { CartItem CartItem = ctx.CartItem.First(x => x.CartItemID == this.CartItemID); CartItem = cartitem; ctx.SaveChanges(); return(CartItem); } }
//Update public Item Update(Item item) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { Item Item = ctx.Item.First(x => x.ItemID == this.ItemID); Item = item; ctx.SaveChanges(); return(Item); } }
//Update public Item Update(Item item) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { Item Item = ctx.Item.First(x => x.ItemID == this.ItemID); Item = item; ctx.SaveChanges(); return Item; } }
//Update public CPA Update(CPA cpa) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { CPA CPA = ctx.CPA.First(x => x.CPAID == this.CPAID); CPA = cpa; ctx.SaveChanges(); return(CPA); } }
//Update public CPA Update(CPA cpa) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { CPA CPA = ctx.CPA.First(x => x.CPAID == this.CPAID); CPA = cpa; ctx.SaveChanges(); return CPA; } }
//Update public AppUser Update(AppUser appuser) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { AppUser AppUser = ctx.AppUser.First(x => x.AppUserID == this.AppUserID); AppUser = appuser; ctx.SaveChanges(); return(AppUser); } }
//Update public Order Update(Order order) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { Order Order = ctx.Order.First(x => x.OrderID == this.OrderID); Order = order; ctx.SaveChanges(); return(Order); } }
//Update public Order Update(Order order) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { Order Order = ctx.Order.First(x => x.OrderID == this.OrderID); Order = order; ctx.SaveChanges(); return Order; } }
//Update public Category Update(Category category) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { Category Category = ctx.Category.First(x => x.CategoryID == this.CategoryID); Category = category; ctx.SaveChanges(); return Category; } }
//Update public CPAStage Update(CPAStage cpastage) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { CPAStage CPAStage = ctx.CPAStage.First(x => x.CPAStageID == this.CPAStageID); CPAStage = cpastage; ctx.SaveChanges(); return(CPAStage); } }
//Update public AppUser Update(AppUser appuser) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { AppUser AppUser = ctx.AppUser.First(x => x.AppUserID == this.AppUserID); AppUser = appuser; ctx.SaveChanges(); return AppUser; } }
//Delete By ID public Boolean Delete(long id) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { try { CartItem CartItem = ctx.CartItem.First(x => x.CartItemID == id); ctx.CartItem.Remove(CartItem); ctx.SaveChanges(); return(true); } catch (Exception ex) { return(false); } } }
//Delete By ID public Boolean Delete(long id) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { try { AppUser AppUser = ctx.AppUser.First(x => x.AppUserID == id); ctx.AppUser.Remove(AppUser); ctx.SaveChanges(); return(true); } catch (Exception ex) { return(false); } } }
//Delete By ID public Boolean Delete(long id) { using(OrderTrackEntities ctx= new OrderTrackEntities()) { try { Order Order = ctx.Order.First(x => x.OrderID == id); ctx.Order.Remove(Order); ctx.SaveChanges(); return true; } catch (Exception ex) { return false; } } }
//Delete By ID public Boolean Delete(long id) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { try { CPAStage CPAStage = ctx.CPAStage.First(x => x.CPAStageID == id); ctx.CPAStage.Remove(CPAStage); ctx.SaveChanges(); return(true); } catch (Exception ex) { return(false); } } }
//Delete By ID public Boolean Delete(long id) { using(OrderTrackEntities ctx= new OrderTrackEntities()) { try { Category Category = ctx.Category.First(x => x.CategoryID == id); ctx.Category.Remove(Category); ctx.SaveChanges(); return true; } catch (Exception ex) { return false; } } }
//Delete By ID public Boolean Delete(long id) { using(OrderTrackEntities ctx= new OrderTrackEntities()) { try { CPAStage CPAStage = ctx.CPAStage.First(x => x.CPAStageID == id); ctx.CPAStage.Remove(CPAStage); ctx.SaveChanges(); return true; } catch (Exception ex) { return false; } } }
//Create public CartItem Insert(CartItem cartitem) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { ctx.CartItem.Add(cartitem); ctx.SaveChanges(); return this; } }
//Update public CartItem Update(CartItem cartitem) { using (OrderTrackEntities ctx = new OrderTrackEntities()) { CartItem CartItem = ctx.CartItem.First(x => x.CartItemID == this.CartItemID); CartItem = cartitem; ctx.SaveChanges(); return CartItem; } }