public virtual async Task <T> GetAsync(Guid guid) { string fileName = this.GetFileName(guid); var json = await _fileManager.GetTextFileAsync(fileName); var item = JsonConvert.DeserializeObject <T>(json); 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); }