public async Task <SolicitudUbicacion> UpdateSolicitudAsync(int destinatarioId, string id, SolicitudUbicacion solicitud) { if (id != solicitud.Id) { throw new NotFoundItemException($"not found solicitud with id:{id}"); } await validateDestinoId(destinatarioId); solicitud.Id = id; solicitud.isEdited = true; var solicitudEntity = mapper.Map <SolicitudUbicacionEntity>(solicitud); ARBRepository.UpdateSolicitudAsync(solicitudEntity); if (await ARBRepository.SaveChangesAsync()) { return(mapper.Map <SolicitudUbicacion>(solicitudEntity)); } throw new Exception("there were an error with the BD"); }