public async Task <ReplaceOneResult> ReplaceUserGame(int id, UserGame item) { var filter = Builders <UserGame> .Filter.Eq("Id", id); return(await _context.GetCollection <UserGame, int>().ReplaceOneAsync(filter, item)); }
public async Task AddUserGame(UserGame item) { await _context.GetCollection <UserGame, int>().InsertOneAsync(item); }