public async Task Actualizar(Siniestro siniestro) { try { _contexto.Update(siniestro); await _contexto.SaveChangesAsync(); } catch (Exception) { throw new CodigoErrorHttpException($"No se ha podido actualizar el siniestro con id {siniestro.Id}", HttpStatusCode.InternalServerError); } }
public async Task Guardar(Usuario usuario) { try { _contexto.Add(usuario); await _contexto.SaveChangesAsync(); } catch (Exception) { throw; } }
public async Task Guardar(Mensaje mensaje) { try { _contexto.Add(mensaje); await _contexto.SaveChangesAsync(); } catch (Exception) { throw; } }
public async Task Eliminar(Archivo documentacion) { try { _contexto.Remove(documentacion); await _contexto.SaveChangesAsync(); } catch (Exception) { throw; } }