public async Task <bool> Post([FromBody] Models.Locatio loc) { context.locations.Add(loc); await context.SaveChangesAsync(); return(true); }
public async Task <IActionResult> Put(int id, [FromBody] Models.Locatio equ) { if (id != equ.Location_id) { return(BadRequest()); } context.Entry(equ).State = EntityState.Modified; await context.SaveChangesAsync(); return(Ok(equ)); }