public async Task <IActionResult> CreatAsync(CreateImageModel model) { var imgForCreate = _mapper.Map <Image>(model); var img = await _imagesService.CreateAsync(imgForCreate); return(CreatedAtAction(nameof(GetAsync), new { id = img.Id, }, _mapper.Map <ImageModel>(img))); }
public async Task <ActionResult <ImageDto> > Create([FromForm] UpsertImageBindingModel createImageBm) { var response = await _imagesService.CreateAsync(Mapper.Map <CreateImageDto>(createImageBm)); return(Ok(response)); }