Sitefinity OpenAccess Fail. Can't recognized MapType() o

Posted by Community Admin on 03-Aug-2018 00:44

Sitefinity OpenAccess Fail. Can't recognized MapType() or HasProperty()

All Replies

Posted by Community Admin on 29-Dec-2010 00:00

Hi,

I am trying to create a new table in the Sitefinity Database and trying to use the OpenAccess Fluent API for it, but it doesn't let me. I am following the example exactly the way it's prescribed in OpenAccess Documentation but it still doesn't work.

What am i doing wrong?

using System.Web;
using System.Linq;
using System.Collections.Generic;
using Telerik.OpenAccess;
using Telerik.OpenAccess.Metadata.Fluent;
  
namespace SitefinityWebApp.Membership
    public class SdnUserProfile
    
        public int Id
        
            get;
            set;
        
  
        public string DateofBirth
        
            get;
            set;
        
  
        public bool CountryofCitizenShip
        
            get;
            set;
        
    
    public class MyFluentMetadataSource : FluentMetadataSource
    
        protected override IList<MappingConfiguration> PrepareMapping()
        
            IList<MappingConfiguration> preparedConfigurations = new List<MappingConfiguration>();
  
            MappingConfiguration<SdnUserProfile> profileConfiguration = new MappingConfiguration<SdnUserProfile>();
            profileConfiguration.MapType().ToTable("SdnUserProfile");
            profileConfiguration.HasProperty(  
            return preparedConfigurations;
        
    

Neither the MapType() nor the HasProperty() are recognized. What am i doing wrong?

Posted by Community Admin on 30-Dec-2010 00:00

Hello Preetham,

The problem is that we use custom build of OA - 2010.2.1013.8. The fluent API you use was introduced with Q3 where OA team officially announced the Fluent API. Most probably we will upgrade the OA assemblies after the official release in our weekly builds.
We also use the "old way" for mapping - Forward Mapping and actually you cannot use Default Mapping with Inheritance until we upgrade the referenced assembly in our code base and switch to the "new way" for mapping. This a task with higher priority for us and it we just need some time to convert all base logic.

Regards,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed