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

[Solved] Telerik OpenAccess with MVC

0 Answers 19 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Deep
Top achievements
Rank 1
Deep asked on 26 Sep 2012, 01:51 PM
Our organization is new to MVC & we are trying out different ORM's. I ran a test project using Telerik OpenAccess ORM and added Telerik Data Model to the project (not under Models). Then I added classes under Models and extended them to appropriate Telerik class. When I run following simple query I get an error.

Here is my query:
IObjectScope scope = Database.Get("WritingPlacementConnection").GetObjectScope();

try
{
   scope
.Transaction.Begin();
   
Reading r = new Reading();
   r
.ReadingURL = reading.ReadingURL;
   r
.IsActive = true;
   scope
.Add(r);
   scope
.Transaction.Commit();
}
finally
{
   scope
.Dispose();
}

This is my error: Telerik.OpenAccess.Exceptions.InvalidOperationException: Class 'WritingChallenge.Reading' is persistent but not known in this context.

Please help
Tags
General Discussions
Asked by
Deep
Top achievements
Rank 1
Share this question
or