public async Task <IActionResult> PutSpecialization(int id, Specialization specialization) { if (id != specialization.Id) { return(BadRequest()); } _context.Entry(specialization).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SpecializationExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutDocumentType(int id, DocumentType documentType) { if (id != documentType.Id) { return(BadRequest()); } _context.Entry(documentType).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!DocumentTypeExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutUnivercity(int id, Univercity univercity) { if (id != univercity.Id) { return(BadRequest()); } _context.Entry(univercity).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UnivercityExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutFeedback(int id, Feedback feedback) { if (id != feedback.Id) { return(BadRequest()); } _context.Entry(feedback).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FeedbackExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutDocument(int id, int documentTypeId, int personId, IFormFile file) { var document = await _context.Documents.FindAsync(id); _context.Entry(document).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!DocumentExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }