public async Task <StarsShipDto> Update(StarsShipDto peopleDto) { var entity = mapper.Map <StarsShip>(peopleDto); await starsShipRepository.UpdateAsync(entity, peopleDto.Id); await starsShipRepository.SaveAsync(); var result = mapper.Map <StarsShipDto>(entity); return(result); }
public async Task <StarsShipDto> Create(StarsShipDto starsShipDto) { var entity = mapper.Map <StarsShip>(starsShipDto); await starsShipRepository.CreateAsync(entity); await starsShipRepository.SaveAsync(); starsShipDto.Id = entity.Id; return(starsShipDto); }
public async Task <StarsShipDto> Random(int id) { StarsShipDto result = await starsShipService.Random(); return(result); }
public async Task <StarsShipDto> Update(StarsShipDto starsShipDto) { StarsShipDto result = await starsShipService.Update(starsShipDto); return(result); }
public async Task <StarsShipDto> GetById(int id) { StarsShipDto result = await starsShipService.Get(id); return(result); }