What 'using' needed when I used CreateRelation method (in DynamicContent class)
Hello everyone,
I have a problem when using CreateRelation method (in CreateRelation class,) what is missing 'using' ?
Regards,
Eddy
my code:
...
using Telerik.Sitefinity;
using Telerik.Sitefinity.Model;
using Telerik.Sitefinity.DynamicModules;
using Telerik.Sitefinity.Data.Linq.Dynamic;
using Telerik.Sitefinity.DynamicModules.Model;
using Telerik.Sitefinity.GenericContent.Model;
using Telerik.Sitefinity.Utilities.TypeConverters;
using Telerik.Sitefinity.Security;
using Telerik.Sitefinity.Lifecycle;
using Telerik.Sitefinity.Modules.Libraries;
namespace SitefinityWebApp
public partial class WebForm1 : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)
// Demonstrates how a collection of Products can be retrieved
public IQueryable<DynamicContent> RetrieveCollectionOfProducts()
...
// Creates a new product item
private void CreateProductItem(DynamicModuleManager dynamicModuleManager, Type productType)
...
DynamicContent productItem = dynamicModuleManager.CreateDataItem(productType);
...
LibrariesManager imageManager = LibrariesManager.GetManager();
var imageItem = imageManager.GetImages().FirstOrDefault(i =>
i.Status ==
Telerik.Sitefinity.GenericContent.Model.ContentLifecycleStatus.Master);
if (imageItem != null)
// This is how we relate an item
productItem.CreateRelation(imageItem, "image");
...
Hi Eddy. You need to add
using
Telerik.Sitefinity.RelatedData;
Hi Victor,
Thanks for your help..
Regards,
Eddy