/// <summary> /// Create (if id = 0) or update BirthdayModel in database. /// </summary> /// <param name="model">BirthdayModel to be saved</param> /// <returns></returns> public void Save(BirthdayModel model) { if (model.Id != 0) { _db.InsertOrReplaceWithChildren(model); } else { _db.InsertWithChildren(model); } }
/// <summary> /// Delete Birthday model from database. /// </summary> /// <param name="model">BirthdayModel to be deleted</param> /// <returns></returns> public int DeleteBirthday(BirthdayModel model) { return(_db.Delete(model)); }