public GameAppUser RemoveFromShelf(GameAppUser gameAppUser) { var dbEntry = _applicationDBContext.GameAppUser.FirstOrDefault (gu => gu.GameId == gameAppUser.GameId && gu.UserId == gameAppUser.UserId); if (dbEntry != null) { _applicationDBContext.GameAppUser.Remove(dbEntry); _applicationDBContext.SaveChanges(); } return(dbEntry); }
public void AddToShelf(GameAppUser gameAppUser) { _applicationDBContext.GameAppUser.Add(gameAppUser); _applicationDBContext.SaveChanges(); }