public async Task <IActionResult> Post([FromBody] TagDTO tagDto) { var tag = _mapper.Map <Tags>(tagDto); await _tagsServices.Add(tag); tagDto = _mapper.Map <TagDTO>(tag); var response = new GenericResponse <TagDTO>(tagDto); return(Ok(response)); }
public async Task <IActionResult> Post([FromBody] TagDTO tagDto) { var tag = _mapper.Map <Tags>(tagDto); await _tagsServices.Add(tag); tagDto = _mapper.Map <TagDTO>(tag); var response = new GenericResponse <TagDTO>(tagDto); return(Ok(response)); }