Exemplo n.º 1
0
        public int UpdateBooking(UpdateEventVM viewModel)
        {
            var bookingToUpdate = RoomTime.SingleOrDefault(b => b.Id == viewModel.BId);

            bookingToUpdate.RId         = viewModel.RoomId;
            bookingToUpdate.StartTime   = viewModel.Start;
            bookingToUpdate.EndTime     = viewModel.End;
            bookingToUpdate.Description = viewModel.Description;

            return(SaveChanges());
        }
Exemplo n.º 2
0
 public int ChangeBooking(UpdateEventVM viewModel)
 {
     return(context.UpdateBooking(viewModel));
 }