Ejemplo n.º 1
0
 /// <summary>
 /// Create (if id = 0) or update achievement in database.
 /// </summary>
 /// <param name="achievement">achievement to be saved.</param>
 /// <returns></returns>
 public void Save(AchievementModel achievement)
 {
     if (achievement.Id != 0)
     {
         _db.InsertOrReplaceWithChildren(achievement);
     }
     else
     {
         _db.Insert(achievement);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Delete achievement from database.
 /// </summary>
 /// <param name="achievement">achievement to be deleted</param>
 /// <returns></returns>
 public int DeleteAchievement(AchievementModel achievement)
 {
     return(_db.Delete(achievement));
 }