public async Task <TEntity> CreateAsync(TEntity entity) { var entityAdded = await _dbContext.AddAsync(entity); await Save(); return(entityAdded.Entity); }
public async Task <GamePick> CreateAsync(Game game, User user) { GamePick gamePick = new GamePick() { Game = game, GameId = game.Id, User = user, UserId = user.Id }; await _dbContext.AddAsync(gamePick); await _dbContext.SaveChangesAsync(); return(gamePick); }