public async Task AddOrUpdateUserLog(UserLogIndex userLog) { var userLogCollection = GetCollection <UserLogIndex>(); if (DoesExist(userLog.SteamId, userLogCollection)) { await UpdateAsync(userLogCollection, userLog.SteamId, userLog.Logs[0]); return; } await InsertAsync(userLogCollection, userLog); }
private async Task InsertAsync(IMongoCollection <UserLogIndex> collection, UserLogIndex userLogIndex) { await collection.InsertOneAsync(userLogIndex); }