public async Task <bool> DeleteTheme(string path) { var existingTheme = await Themes.FirstOrDefaultAsync(t => t.Id == path); if (existingTheme != null) { Remove(existingTheme); var contentItems = ContentItems.Where(c => c.Path.StartsWith(path)); foreach (var item in contentItems) { Remove(item); } UnitOfWork.Commit(); } return(true); }