public void AddShow(Show show) { using (var context = new StarShowDBEntities()) { context.Shows.Add(show); } }
public void AddUser(User user) { using (var context = new StarShowDBEntities()) { context.Users.Add(user); } }
public void AddSlot(Slot slot) { using (var context = new StarShowDBEntities()) { context.Slots.Add(slot); } }
public void AddLocation(Location location) { using (var context = new StarShowDBEntities()) { context.Locations.Add(location); } }
public bool DeleteLocation(Location location) { using (var context = new StarShowDBEntities()) { context.Locations.Remove(location); } return(true); }
public bool DeleteOrder(Order order) { using (var context = new StarShowDBEntities()) { context.Orders.Remove(order); } return(true); }
public void UpdateShow(Show show) { using (var context = new StarShowDBEntities()) { Show _show = context.Shows.Where(q => q.id == show.id).FirstOrDefault(); _show = show; context.SaveChanges(); } }
public void UpdateLocation(Location location) { using (var context = new StarShowDBEntities()) { Location l = context.Locations.Where(q => q.id == location.id).FirstOrDefault(); l = location; context.SaveChanges(); } }
public void UpdateSlot(Slot slot) { using (var context = new StarShowDBEntities()) { Slot _slot = context.Slots.Where(q => q.id == slot.id).FirstOrDefault(); _slot = slot; context.SaveChanges(); } }
public bool DeleteSlot(string id) { using (var context = new StarShowDBEntities()) { Slot slot = context.Slots.Where(q => q.id == id).FirstOrDefault(); context.Slots.Remove(slot); } return(true); }
public bool DeleteShow(string id) { using (var context = new StarShowDBEntities()) { Show show = context.Shows.Where(q => q.id == id).FirstOrDefault(); show.status = 0; context.SaveChanges(); } return(true); }
public List <Order> GetOrders() { List <Order> orders; using (var context = new StarShowDBEntities()) { orders = context.Orders.ToList(); } return(orders); }
public Order GetOrder(string id) { Order order; using (var context = new StarShowDBEntities()) { order = context.Orders.Where(q => q.id == id).FirstOrDefault(); } return(order); }
public List <Show> GetShows() { List <Show> shows; using (var context = new StarShowDBEntities()) { shows = context.Shows.Where(q => q.status != 0).ToList(); } return(shows); }
public List <Slot> GetSlots() { List <Slot> slots; using (var context = new StarShowDBEntities()) { slots = context.Slots.ToList(); } return(slots); }
public Slot GetSlot(string id) { Slot slot; using (var context = new StarShowDBEntities()) { slot = context.Slots.Where(q => q.id == id).FirstOrDefault(); } return(slot); }
public List <User> GetUsers() { List <User> users; using (var context = new StarShowDBEntities()) { users = context.Users.ToList(); } return(users); }
public Show GetShow(string id) { Show show; using (var context = new StarShowDBEntities()) { show = context.Shows.Where(q => q.id == id && q.status != 0).FirstOrDefault(); } return(show); }
public Location GetLocation(string id) { Location location; using (var context = new StarShowDBEntities()) { location = context.Locations.Where(q => q.id == id).FirstOrDefault(); } return(location); }
public List <Location> GetLocations() { List <Location> locations; using (var context = new StarShowDBEntities()) { locations = context.Locations.ToList(); } return(locations); }