public DetailsCardModel Build() { IList <CategoryModel> left = CategoriesLeft.Select(e => e.Build()).Where(e => e.Preferences.Count > 0 && e.Preferences.Any(p => p.HasContent())).ToList(); IList <CategoryModel> right = CategoriesRight.Select(e => e.Build()).Where(e => e.Preferences.Count > 0 && e.Preferences.Any(p => p.HasContent())).ToList(); return(new DetailsCardModel(Title, IsSharable, left, right)); }
public DetailsCardBuilder AddCategoryRight(CategoryModel.Builder builder) { CategoriesRight.Add(builder); return(this); }