public async Task <TProjectConfig> AddOrUpdateProject <TProjectConfig>(ProjectMetadata projectMetadata, TProjectConfig project) where TProjectConfig : ProjectConfig { await _projectsMetadataRepo.AddOrUpdate(projectMetadata); await _projectRepo.AddOrUpdate(projectMetadata, project); _memoryCache.Remove(ProjectsMetaCacheKey); return(project); }