Example #1
0
        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();
        }
Example #2
0
        public async Task CreateAsync(Priority priority)
        {
            context.Add(priority);

            await context.SaveChangesAsync();
        }
Example #3
0
        public async Task CreateAsync(WishlistItem wishlistItem)
        {
            context.Add(wishlistItem);

            await context.SaveChangesAsync();
        }
Example #4
0
        public async Task CreateAsync(Language language)
        {
            context.Add(language);

            await context.SaveChangesAsync();
        }
Example #5
0
        public async Task CreateAsync(Platform platform)
        {
            context.Add(platform);

            await context.SaveChangesAsync();
        }
Example #6
0
        public async Task CreateAsync(Series series)
        {
            context.Add(series);

            await context.SaveChangesAsync();
        }
Example #7
0
        public async Task CreateAsync(Genre genre)
        {
            context.Add(genre);

            await context.SaveChangesAsync();
        }
Example #8
0
        public async Task CreateAsync(Tag tag)
        {
            context.Add(tag);

            await context.SaveChangesAsync();
        }
Example #9
0
        public async Task CreateAsync(OwnershipStatus ownershipStatus)
        {
            context.Add(ownershipStatus);

            await context.SaveChangesAsync();
        }
Example #10
0
        public async Task CreateAsync(MediaType mediaType)
        {
            context.Add(mediaType);

            await context.SaveChangesAsync();
        }
Example #11
0
        public async Task CreateAsync(Developer developer)
        {
            context.Add(developer);

            await context.SaveChangesAsync();
        }
Example #12
0
        public async Task CreateAsync(Mode mode)
        {
            context.Add(mode);

            await context.SaveChangesAsync();
        }
Example #13
0
        public async Task CreateAsync(PlayStatus playStatus)
        {
            context.Add(playStatus);

            await context.SaveChangesAsync();
        }
Example #14
0
        public async Task CreateAsync(Playthrough playthrough)
        {
            context.Add(playthrough);

            await context.SaveChangesAsync();
        }
Example #15
0
        public async Task UpdateAsync(PlayData playData)
        {
            context.Update(playData);

            await context.SaveChangesAsync();
        }
Example #16
0
        public async Task CreateAsync(Publisher publisher)
        {
            context.Add(publisher);

            await context.SaveChangesAsync();
        }