.NET ORM that supports multithreading better?

I know that questions about .net ORM have been asked thousands of times, but I want to know which ORM is easy to work with in a multi-threaded environment. Commercial or free are welcome.

I am currently using XPO from Devexpress, but I feel inconvenient to use in a multi-threaded application. An object from one thread cannot be transferred by another thread, to use it in another thread, I need to find the object from the database using the key, this is really annoying. You cannot save the state of a database object in the database, even if you lock the state of the object. for example, the Save () method cannot be called from a thread other than the one that creates the object.

By the way, I'm just starting out with XPO, maybe I'm using it the wrong way.

+3
source share
3 answers

nHibernate is used in many applications, some of which are multithreaded.

See the documentation on concurrency , in particular the section 10.2- it clearly states that it is ISession not thread safe (so you need to manage this yourself).

Can you clarify what makes ORM “easy to use”, how concerned are you?

+1
source

Each O / RM works fine in a multi-threaded application. I used LINQ to SQL and Entity Framework in ASP.NET applications (which are multi-threaded for each definition).

O/RM , , , . , O/RM , Unit of Work (, LINQ to SQL DataContext, Entity Framework ObjectContext XPO Session)). . , O/RM .

0

ObjectContext Entity Framework , , , , , .

, , /, .

, ObjectContext . :

, , , concurrency. ObjectContext , . ObjectContext, ObjectContext . , , , ObjectContext , . , , , , ObjectContext; , , , ObjectContext , , .

Entity Framework object context in ASP.NET Session object?

0
source

Source: https://habr.com/ru/post/1778479/


All Articles