public AchievementTierProgressModel GetProgressForTier(int achievementId, Tier t) { try { return(tieredAchievementsProgress.First(p => p.AchievementId == achievementId && p.Tier == t)); } catch (InvalidOperationException) { var p = new AchievementTierProgressModel(achievementId, t); tieredAchievementsProgress.Add(p); return(p); } }
public async Task UpdateTieredAchievementProgress(AchievementTierProgressModel progress) { await connection.InsertOrReplaceAsync(progress, typeof(AchievementTierProgressModel)); }