I'm trying out this ORM & new to this. I have following code:
IObjectScope scope = Database.Get("MyConnection").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();
}
When I run this I get following error on "Add":
Telerik.OpenAccess.Exceptions.InvalidOperationException: Class 'WritingChallenge.Reading' is persistent but not known in this context.
It seems for some reason database connection is lost? I'm not sure what is the issue here.