public async Task <ActionResult <DetailViewModel> > Get(int id) { var user = await _detailService.GetByIdAsync(id, Bll.Extensions.DetailExtensions.ToDto); if (user == null) { return(NotFound(nameof(DetailViewModel))); } return(Ok(user.ToViewModel())); }
public async Task <ActionResult <DetailDTO> > GetID(long id) { var detail = await _detailService.GetByIdAsync(id); return(Ok(detail)); }
public async Task <Detail> GetById(int id) { return(await detailService.GetByIdAsync(id)); }