public async Task <Core.Entities.RoomService> AddRoomService(RequestServiceAddModel roomService) { var dbService = new Core.Entities.RoomService() { RoomId = roomService.RoomId, CustomerId = roomService.CustomerId, SDesc = roomService.SDesc, ServiceDate = roomService.ServiceDate, CheckIn = roomService.CheckIn, TotalPersons = roomService.TotalPersons, BookingDays = roomService.BookingDays, Advance = roomService.Advance, Amount = roomService.Amount }; return(await _roomServiceRepo.AddAsync(dbService)); }
public async Task <Core.Entities.RoomService> UpdateById(int id, RequestServiceAddModel roomService) { // convert RequestServiceAddModel -> RoomService var dbService = new Core.Entities.RoomService() { RoomId = roomService.RoomId, CustomerId = roomService.CustomerId, SDesc = roomService.SDesc, ServiceDate = roomService.ServiceDate, CheckIn = roomService.CheckIn, TotalPersons = roomService.TotalPersons, BookingDays = roomService.BookingDays, Advance = roomService.Advance, Amount = roomService.Amount }; return(await _roomServiceRepo.UpdateAsync(id, dbService)); }