public async Task <IActionResult> Post(Users user) { var newUser = await odysseyDB.Users.AddAsync(user); await odysseyDB.SaveChangesAsync(); return(Ok(newUser.Entity)); }
public async Task <IActionResult> Delete(int id) { var song = await odysseyDB.Users.FindAsync(id); if (song == null) { return(NotFound()); } odysseyDB.Users.Remove(song); await odysseyDB.SaveChangesAsync(); return(NoContent()); }