public async Task <IActionResult> PutArt_NLieta(decimal id, Art_NLieta art_NLieta) { if (id != art_NLieta.KODS) { return(BadRequest()); } _context.Entry(art_NLieta).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Art_NLietaExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult> PutArt_Organiz(decimal id, [FromBody] Art_OrganizEditingDTO art_OrganizEditing) { var organizacija = _mapper.Map <Art_Organiz>(art_OrganizEditing); organizacija.ID = id; organizacija.DAT_MOD = DateTime.Now; _context.Entry(organizacija).State = EntityState.Modified; await _context.SaveChangesAsync(); return(NoContent()); }