public async Task <Project> GetProject(string slug) { var projects = await _cache.GetProjects(); var project = projects.FirstOrDefault(p => p.Data.Slug == slug); return(_mapper.MapToProject(project)); }
public async Task <Project> GetProject(string id) { var projects = await GetItemFromCache(CacheConstants.SquidexSchemas.Projects, () => _repo.GetProjects()); var project = projects.FirstOrDefault(p => p.Id == id); return(_mapper.MapToProject(project)); }