public async Task <DBFile> GetFile(Guid file) { return(await TblFiles.Where(f => f.Id == file).FirstOrDefault().ExecuteAsync().ConfigureAwait(false)); }
public async Task <IEnumerable <DBFile> > GetFiles(Guid backup) { return(await TblFiles.Where(f => f.Backup == backup).ExecuteAsync().ConfigureAwait(false)); }
public async Task <long> BackupSize(Guid backupId) { var files = await TblFiles.Where(f => f.Backup == backupId).Select(f => f.Length).ExecuteAsync().ConfigureAwait(false); return(files.Sum()); }