Subtext.Framework.Providers.ObjectProvider.CreateLinkCategory C# (CSharp) Method

CreateLinkCategory() public abstract method

public abstract CreateLinkCategory ( LinkCategory lc ) : int
lc Subtext.Framework.Components.LinkCategory
return int
        public abstract int CreateLinkCategory(LinkCategory lc);

Usage Example

 private static void CreateWelcomeCategories(ObjectProvider repository, Blog blog)
 {
     repository.CreateLinkCategory(new LinkCategory
     {
         Title = "Programming",
         Description = "Blog posts related to programming",
         BlogId = blog.Id,
         IsActive = true,
         CategoryType = CategoryType.PostCollection,
     });
     repository.CreateLinkCategory(new LinkCategory
     {
         Title = "Personal",
         Description = "Personal musings, random thoughts.",
         BlogId = blog.Id,
         IsActive = true,
         CategoryType = CategoryType.PostCollection
     });
 }