public PmsResponseDto AddRoom([FromBody] AddRoomRequestDto request) { if (request == null || request.Rooms == null || request.Rooms.Count <= 0) { throw new PmsException("Room can not be added."); } var response = new PmsResponseDto(); if (_iPmsLogic.AddRoom(request.Rooms)) { response.ResponseStatus = PmsApiStatus.Success.ToString(); response.StatusDescription = "Record(s) saved successfully."; } else { response.ResponseStatus = PmsApiStatus.Failure.ToString(); response.StatusDescription = "Operation failed.Please contact administrator."; } return(response); }