public async Task <IActionResult> PutIdentification(int id, PublicApi.v1.DTO.Identification identification) { if (id != identification.Id) { return(BadRequest()); } _bll.Identifications.Update(PublicApi.v1.Mappers.IdentificationMapper.MapFromExternal(identification)); await _bll.SaveChangesAsync(); return(NoContent()); }
public async Task <ActionResult <PublicApi.v1.DTO.Identification> > PostIdentification(PublicApi.v1.DTO.Identification identification) { _bll.Identifications.Add(PublicApi.v1.Mappers.IdentificationMapper.MapFromExternal(identification)); await _bll.SaveChangesAsync(); return(CreatedAtAction( nameof(GetIdentification), new { version = HttpContext.GetRequestedApiVersion().ToString(), id = identification.Id }, identification)); }