/// <summary> /// Updates a single video game /// </summary> /// <param name="g"></param> /// <param name="context"></param> /// <returns></returns> public static async Task <VideoGame> UpdateGame(VideoGame g, GameContext context) { context.Update(g); await context.SaveChangesAsync(); return(g); }
public static async Task <VideoGame> UpdateGame(VideoGame g, GameContext context) { //Starts tracking to get to update context.Update(g); //Await because this is touching the DB for the update await context.SaveChangesAsync(); return(g); }