public async Task <bool> UpdateAutomatic() { try { var resultForUpdate = await _geralPersist.GetInfo(); resultForUpdate.UpdatedAt = DateTime.Now; var countBiblias = await _geralPersist.GetAll(); resultForUpdate.RegistersCount = countBiblias.Count; FileInfo fileInfo = new FileInfo(Directory.GetCurrentDirectory() + "\\PocketNewTestament.db"); resultForUpdate.DatabaseSize = fileInfo.Length.ToString(); _geralPersist.Update <Info>(resultForUpdate); if (await _geralPersist.SaveChangesAsync()) { return(true); } return(false); } catch (Exception e) { throw new Exception(e.Message); } }
public async Task <List <Biblia> > GetAll() { return(await _geralPersist.GetAll()); }