public async Task <IActionResult> PutPlace(uint id, Place place) { if (id != place.PlaceID) { return(BadRequest()); } _context.Entry(place).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PlaceExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <Map> > PostMap(Map map) { _context.Maps.Add(map); await _context.SaveChangesAsync(); return(CreatedAtAction(nameof(GetMap), new { id = map.Id }, map)); }
public void CommitAsync() { dataContext.SaveChangesAsync(); }