public CategoryContentViewModel AddCategory(string title, string description) { var slug = _slugService.CreateSlugFromPostTitle(title); var category = _dataProvider.AddCategory(title, description, slug); return(new CategoryContentViewModel { Id = category.Id, Title = category.Title, NumPosts = category.PostCategories.Count, Description = category.Description, Slug = category.Slug }); }