public bool addBooking(Booking booking) { var data = _dbContext.Events.Where(e => e.event_id == booking.event_id).FirstOrDefault(); data.available_seats -= booking.No_of_tickets; _dbContext.Bookings.Add(booking); _dbContext.SaveChanges(); return(true); }
public bool addComment(Comment commentEntity) { _dbContext.Comments.Add(commentEntity); _dbContext.SaveChanges(); return(true); }
public List <User> AddUser(User user) { _db.users.Add(user); _db.SaveChanges(); return(_db.users.ToList()); }
public bool RegisterUser(User user) { _applicationdbcontext.Users.Add(user); _applicationdbcontext.SaveChanges(); return(true); }
public bool addEvent(Event events) { _dbContext.Events.Add(events); _dbContext.SaveChanges(); return(true); }
public bool addVenue(Venue venue) { _dbContext.Venues.Add(venue); _dbContext.SaveChanges(); return(true); }