public ReservationManagerInfoDto Create(ReservationManagerInfoCreateOrupdateDto inputDto) { var resManager = new ReservationManagerInfo(GuidGenerator.Create(), inputDto.Name, inputDto.OpenDays); CreateResCondition(inputDto.ConditionCreateDtos, resManager.ReservationConditions, resManager.Id); var resManagerDto = _rmInfoRepository.InsertAsync(resManager).Result; CurrentUnitOfWork.CompleteAsync(); return(ObjectMapper.Map <ReservationManagerInfo, ReservationManagerInfoDto>(resManagerDto)); }
public ReservationManagerInfoDto Update(Guid id, ReservationManagerInfoCreateOrupdateDto inputDto) { var entity = _rmInfoRepository.FindAsync(id).Result; if (entity == null) { throw new EntityNotFoundException(typeof(ReservationManagerInfo), entity.Id); } entity.SetOpenDays(inputDto.OpenDays); entity.SetIncludeDay(inputDto.IncludeDay); return(ObjectMapper.Map <ReservationManagerInfo, ReservationManagerInfoDto>( _rmInfoRepository.UpdateAsync(entity).Result)); }
public ReservationManagerInfoDto Update(Guid id, ReservationManagerInfoCreateOrupdateDto inputDto) { return(_resMangerAppService.Update(id, inputDto)); }
public ReservationManagerInfoDto Create(ReservationManagerInfoCreateOrupdateDto inputDto) { return(_resMangerAppService.Create(inputDto)); }