public void AddRoomStatus() { try { var roomStatus = new RoomStatus(); Console.WriteLine("Print Status: "); roomStatus.Status = Console.ReadLine(); if (!Validation.IsNullOrEmpty(roomStatus.Status) || !Validation.ValidateString(roomStatus.Status)) { AddRoomStatus(); } roomStatusService.AddRoomStatus(roomStatus); Console.WriteLine("Object successful added"); ConsoleRoomStatusPresenter.Present(roomStatusService.ReadRoomStatuses()); } catch (Exception ex) { Console.WriteLine(ex.Message); AddRoomStatus(); } }
public IEnumerable <RoomStatusViewModel> ReadRoomStatuses() { return(mapper.Map <IEnumerable <RoomStatusViewModel> >(roomStatusRepository.ReadRoomStatuses())); }