This is a migrated thread and some comments may be shown as answers.

new version problem

1 Answer 89 Views
Getting Started
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Hans
Top achievements
Rank 1
Hans asked on 17 Mar 2011, 06:44 PM
Hi !

After I installed the new version of ORM I have a problem.
So I have a table with 2 field ID and Description.
I have this code

 

public static IList<PA_JobType

> GetPaJobTypeList()

 

 

{

 

 

 

IList<PA_JobType> listObj;

 

 

 

using (WoDbContext localContext = new WoDbContext

())

 

 

{

 

 

 

IQueryable<PA_JobType> tempListObj = (from c in localContext.PA_JobTypes select

c).OrderBy(f => f.JobType);

 

 

listObj = tempListObj.ToList();

 

}

 

 

 

return

listObj;

 

 

}

 



Before this coee run perfect. I as able to bind this list to a control to show id and description.
Now, after ORM upgrade, I get this error:
Description = '(new System.Collections.Generic.Mscorlib_CollectionDebugView<WO_BaseClassLibrary.PA_JobType>(listJobType)).Items[0].Description' threw an exception of type 'Telerik.OpenAccess.Exceptions.InvalidOperationException'

base {Telerik.OpenAccess.OpenAccessException} = {"The 'IObjectScope' is already closed"}

Why I get this error ?

Regards
Hans









1 Answer, 1 is accepted

Sort by
0
Accepted
Damyan Bogoev
Telerik team
answered on 21 Mar 2011, 04:13 PM
Hello Hans,

Firstly I want to apologize for the inconvenience caused. We have located the cause for the problem and fixed it. The fix will be included in the next internal build of the product which is expected later this week.
If you cannot wait for the build, you could use a long-running context in the helper class in order to avoid this behavior.
We will let you know once the new build is available.
You could find your Telerik points updated.

Best wishes,
Damyan Bogoev
the Telerik team
Tags
Getting Started
Asked by
Hans
Top achievements
Rank 1
Answers by
Damyan Bogoev
Telerik team
Share this question
or