Im trying to add dynamic Propertys to a Document type with this code:
using umbraco.cms.businesslogic.datatype;
using umbraco.cms.businesslogic.web;
var dt = DocumentType.GetByAlias("NAME");
var pType = dt.AddPropertyType(new DataTypeDefinition(-49), "Alias", "Name");
This works perfect, but the problem is that the class "umbraco.cms.businesslogic.web" is deprecated.
Which Class can i use instead for the same functionality?
Class umbraco.cms.businesslogic.web Deprecated
Im trying to add dynamic Propertys to a Document type with this code:
This works perfect, but the problem is that the class "umbraco.cms.businesslogic.web" is deprecated.
Which Class can i use instead for the same functionality?
Thanks.
You should use the
Umbraco.Core.Services.IContentTypeService
instance inUmbraco.Web.UmbracoContext.Current.Application.Services.ContentTypeService
.Googling "umbraco contenttypeservice" yealds; amongst others; this nice blogpost with an example of how to create a content type using the service.
http://www.frakkingsweet.com/my-blog/create-content-type-in-umbraco
is working on a reply...