public virtual async Task <T> FindAsync(Guid guid) { string fileName = this.GetFileName(guid); if (!await _fileManager.FileExistsAsync(fileName)) { return(null); } var item = await GetAsync(guid); return(item); }
public virtual async Task <Site> GetAsync() { if (await _fileManager.FileExistsAsync("site.json") == false) { return(new Site()); } var json = await _fileManager.GetTextFileAsync("site.json"); var item = JsonConvert.DeserializeObject <Site>(json); return(item); }