public void AddPrayer(Prayer prayer) { using (var database = new VersesSQLiteConnection(Path)) { database.AddPrayer(prayer); } }
public IEnumerable <Verse> GetMemorizationsForCategory(MemorizationCategory category) { using (var database = new VersesSQLiteConnection(Path)) { return(database.GetMemorizationsForCategory(category)); } }
public IEnumerable <Prayer> GetPrayers() { using (var database = new VersesSQLiteConnection(Path)) { return(database.GetAllPrayers()); } }
public bool UpdatePrayer(Prayer prayer) { using (var database = new VersesSQLiteConnection(Path)) { if (database.PrayerExists(prayer.Id)) { database.UpdatePrayer(prayer); return(true); } return(false); } }
public bool UpdateVerse(Verse verse) { using (var database = new VersesSQLiteConnection(Path)) { if (database.VerseExists(verse.Title)) { database.UpdateVerse(verse); return(true); } return(false); } }
public bool UpdatePrayer(string prayerTitle) { using (var database = new VersesSQLiteConnection(Path)) { if (database.PrayerExists(prayerTitle)) { var prayer = database.GetPrayer(prayerTitle); database.UpdatePrayer(prayer); return(true); } return(false); } }
public bool UpdateVerse(string verseTitle) { using (var database = new VersesSQLiteConnection(Path)) { if (database.VerseExists(verseTitle)) { var verse = database.GetVerse(verseTitle); database.UpdateVerse(verse); return(true); } return(false); } }
public bool AddVerse(Verse verse) { var title = verse.Title; using (var database = new VersesSQLiteConnection(Path)) { if (database.VerseExists(title)) { return(false); } database.AddVerse(verse); return(true); } }
public bool UpdateVerseMemorizationEnabled(string verseTitle, bool enabled) { using (var database = new VersesSQLiteConnection(Path)) { if (database.VerseExists(verseTitle)) { var verse = database.GetVerse(verseTitle); verse.Memorizable = true; database.UpdateVerse(verse); return(true); } return(false); } }
public bool MoveVerseToCategory(int verseId, MemorizationCategory category) { using (var database = new VersesSQLiteConnection(Path)) { if (database.VerseExists(verseId)) { var verse = database.GetVerse(verseId); verse.Category = category; database.UpdateVerse(verse); return(true); } return(false); } }