This question is locked. New answers and comments are not allowed.
Greetings.
I'm in the process of evaluating OpenAccess ORM.The first test has been amazingly quick and neat, but as soon as I delved a bit deeper, troubles started.
The scenario is a multi-threaded Windows service, built with Visual Studio 2010 on .NET 4.0.
The OpenAccess version is the 2011.2.713.3 Trial.
The database is SQL Server 2008 R2.
There's a main project, that is the service and some libraries. A couple of them are "Telerik OpenAccess Class Library" projects.
The simplest one, is made by just one class and is used to log application informations into a database.
When I try to log infos into the database, I first got an error due to a transaction still active:
Not allowed because Commit / Rollback is in progress
using the private static LogModel _logContext = new LogModel("LogConnection"); and the associated SaveChanges().
Ok, the two calls come from two different threads.
If I have understood well, I need to do some configurations. After rummaging into the forums that's what I came up with:
I get this nice error:
Telerik.OpenAccess: No enhanced assembly has been found for meta-data construction. This may be caused by a missing app.config file (use app.config as embedded resource then) or by an insufficient references section in the configuration file (add the referenced enhanced assemblies there too) or by a wrong enhancement setting; please check your configuration.
I tried manually setting the venhance post-build command, but nothing changed.
If I use the context, I sitll get the transaction error.
I went through a lot of threads and help links, but I'm still stuck there.
Could you gently give me some insight?
Thanks very much,
Gianni Araco
I'm in the process of evaluating OpenAccess ORM.The first test has been amazingly quick and neat, but as soon as I delved a bit deeper, troubles started.
The scenario is a multi-threaded Windows service, built with Visual Studio 2010 on .NET 4.0.
The OpenAccess version is the 2011.2.713.3 Trial.
The database is SQL Server 2008 R2.
There's a main project, that is the service and some libraries. A couple of them are "Telerik OpenAccess Class Library" projects.
The simplest one, is made by just one class and is used to log application informations into a database.
When I try to log infos into the database, I first got an error due to a transaction still active:
Not allowed because Commit / Rollback is in progress
using the private static LogModel _logContext = new LogModel("LogConnection"); and the associated SaveChanges().
Ok, the two calls come from two different threads.
If I have understood well, I need to do some configurations. After rummaging into the forums that's what I came up with:
<
openaccess
>
<
connections
>
<
connection
id
=
"LogConnection"
>
<
databasename
>Log</
databasename
>
<
servername
>Server</
servername
>
<
user
>sa</
user
>
<
password
>sa</
password
>
<
backendconfigurationname
>LogBackend</
backendconfigurationname
>
</
connection
>
</
connections
>
<
backendconfigurations
>
<
backendconfiguration
id
=
"LogBackend"
backend
=
"mssql"
>
<
l2CacheEnabled
>false</
l2CacheEnabled
>
<
l2QueryCacheEnabled
>false</
l2QueryCacheEnabled
>
<
logging.logEvents
>all</
logging.logEvents
>
<
logging.logEventsToSysOut
>true</
logging.logEventsToSysOut
>
<
option.Multithreaded
>true</
option.Multithreaded
>
</
backendconfiguration
>
</
backendconfigurations
>
</
openaccess
>
I thought this was enaugh, but.... now when I try to use the following code from within the Log project
IObjectScope o = Database.Get("LogConnection").GetObjectScope();
I get this nice error:
Telerik.OpenAccess: No enhanced assembly has been found for meta-data construction. This may be caused by a missing app.config file (use app.config as embedded resource then) or by an insufficient references section in the configuration file (add the referenced enhanced assemblies there too) or by a wrong enhancement setting; please check your configuration.
I tried manually setting the venhance post-build command, but nothing changed.
If I use the context, I sitll get the transaction error.
I went through a lot of threads and help links, but I'm still stuck there.
Could you gently give me some insight?
Thanks very much,
Gianni Araco