public async Task <bool> SaveWhiteListToFileAndDb(List <string> steamIds, PavlovServer server)
        {
            //delete old stuff
            foreach (var old in await FindAllFrom(server))
            {
                await Delete(old.Id);
            }
            //only save SteamIdsList to DB
            foreach (var newId in steamIds)
            {
                var entry = new ServerSelectedWhiteList
                {
                    PavlovServer    = server,
                    SteamIdentityId = newId
                };
                await Insert(entry);
            }

            SaveToFile(server, steamIds);
            return(true);
        }
 public async Task <bool> Update(ServerSelectedWhiteList serverSelectedWhiteList)
 {
     return(await _liteDb.LiteDatabaseAsync.GetCollection <ServerSelectedWhiteList>("ServerSelectedWhiteList")
            .UpdateAsync(serverSelectedWhiteList));
 }
 public async Task <int> Insert(ServerSelectedWhiteList serverSelectedMap)
 {
     return(await _liteDb.LiteDatabaseAsync.GetCollection <ServerSelectedWhiteList>("ServerSelectedWhiteList")
            .InsertAsync(serverSelectedMap));
 }