public async Task <IActionResult> PutListOfCalculations(int id, ListOfCalculations listOfCalculations) { if (id != listOfCalculations.Id) { return(BadRequest()); } _context.Entry(listOfCalculations).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ListOfCalculationsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public bool DeleteRow(long RowId) { var removed = false; ListOfCalculations row = GetRow(RowId); if (row != null) { removed = true; context.ListOfCalculations.Remove(row); } return(removed); }