Showing posts with label entity data source. Show all posts
Showing posts with label entity data source. Show all posts

Friday, December 06, 2013

Chronicles on Migration From Entity Framework to Telerik OpenAccess - 1


I have to replace all the EntityDataSources to OpenAccessLinqDataSource's(or the old OpenAccessDataSource)
So this below:
<asp:EntityDataSource runat="server" ID="edsDegree" ConnectionString="name=Entities"  
DefaultContainerName="Entities" EnableFlattening="False"
    EntitySetName="Degrees" Include="College,DegreeType,MajorType"
    EntityTypeFilter="Degree" Where="it.UserID=@UserID">
    <WhereParameters>
        <asp:Parameter Name="UserID" DbType="Int32" />
    </WhereParameters>
</asp:EntityDataSource> 
will become :
<telerik:OpenAccessLinqDataSource runat="server" ID="edsDegree"
    ResourceSetName="Degrees" EntityTypeName="" 
ContextTypeName="DataModel.data"
  Select=" new (PlannedGraduationDate,GraduationDate, College,DegreeType,MajorType)"
    Where="it.UserID=@UserID">
    <WhereParameters>
        <asp:Parameter Name="UserID" DbType="Int32" />
    </WhereParameters>
</telerik:OpenAccessLinqDataSource>
 
 
Neither of the telerik data controls have the "Include" property. So if the EntityDataSource is using it ,
you can Include your related entities as Select="new (ID,Name, ChildEntity )".In the above examples related entities of Degree entity are:
College,DegreeType,MajorType

Tuesday, June 11, 2013

Permanent Fix to "Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information"

I keep getting this "Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information" Every time I had to restart IIS to temporarily fix it. I tried many things to resolve the issue nothing really helped. Finally I have a permanent fix : It's fixed in .Net 4.5 framework You have to install .NEt 4.5 and do nothing else. According to forums 4.5 requires VS 2012 And I m still using 2010