public async Task AddAsync(Game newGame) { _context.Add(newGame); newGame.PlayData = new List <PlayData>(); foreach (var user in _context.Players) { newGame.PlayData.Add(new PlayData { CurrentlyPlaying = false, Dropped = false, PlayerID = user.ID, GameID = newGame.ID }); } await _context.SaveChangesAsync(); }
public async Task CreateAsync(Priority priority) { context.Add(priority); await context.SaveChangesAsync(); }
public async Task CreateAsync(WishlistItem wishlistItem) { context.Add(wishlistItem); await context.SaveChangesAsync(); }
public async Task CreateAsync(Language language) { context.Add(language); await context.SaveChangesAsync(); }
public async Task CreateAsync(Platform platform) { context.Add(platform); await context.SaveChangesAsync(); }
public async Task CreateAsync(Series series) { context.Add(series); await context.SaveChangesAsync(); }
public async Task CreateAsync(Genre genre) { context.Add(genre); await context.SaveChangesAsync(); }
public async Task CreateAsync(Tag tag) { context.Add(tag); await context.SaveChangesAsync(); }
public async Task CreateAsync(OwnershipStatus ownershipStatus) { context.Add(ownershipStatus); await context.SaveChangesAsync(); }
public async Task CreateAsync(MediaType mediaType) { context.Add(mediaType); await context.SaveChangesAsync(); }
public async Task CreateAsync(Developer developer) { context.Add(developer); await context.SaveChangesAsync(); }
public async Task CreateAsync(Mode mode) { context.Add(mode); await context.SaveChangesAsync(); }
public async Task CreateAsync(PlayStatus playStatus) { context.Add(playStatus); await context.SaveChangesAsync(); }
public async Task CreateAsync(Playthrough playthrough) { context.Add(playthrough); await context.SaveChangesAsync(); }
public async Task CreateAsync(Publisher publisher) { context.Add(publisher); await context.SaveChangesAsync(); }