public async Task <IActionResult> Put(Dives dive) { _divectx.Entry(dive).State = EntityState.Modified; await _divectx.SaveChangesAsync(); return(NoContent()); }
public async Task <IActionResult> Post(Dives dive) { _divectx.Add(dive); await _divectx.SaveChangesAsync(); return(Ok(dive.Id)); }
public async Task <IActionResult> Delete(long id) { var div = new Dives { Id = id }; _divectx.Remove(div); await _divectx.SaveChangesAsync(); return(NoContent()); }
public void AddDive(Dive dive) { Dives.Add(dive); }