public bool BookRoom(BookingViewModel bookingViewModel) { var config = new MapperConfiguration(cfg => { cfg.CreateMap <BookingViewModel, HM_Booking>(); }); IMapper mapper = config.CreateMapper(); var booking = mapper.Map <BookingViewModel, HM_Booking>(bookingViewModel); return(_bookingRepository.BookRoom(booking)); }
public bool BookRoom(int roomId, DateTime date) { bool status = _bookingsRepository.BookRoom(roomId, date); return(status); }
public string BookRoom(short roomid, DateTime bookingDate) { return(_bookingRepository.BookRoom(roomid, bookingDate)); }