Performance Entity Framework 4 and Poco and Linq2Sql

I am thinking of using POCO instead of automatically creating entities, because I don't want any structure dependency

I was wondering if this would have any kind of performance hit, I'm not sure if dynamically proxying my entities at runtime will affect performance,

I also wonder if it will be faster if I just let EF4 generate the model for me.

My current project cares a lot about performance, and I read many times about how L2S is slightly faster than EF2, but I'm not sure about EF4, so now I wonder if I will have performance problems using EF4 instead of Linq2SQL .

I really want to use POCO; therefore I prefer EF4, but again I do not want to have a performance problem.

EF4 and Ling2SQL are the only options for me because I cannot use the native ADO.net or any other ORM, so can you share your experience regarding EF4 and Linq2SQL in terms of performance?

early.

+3
source share
4 answers

Recently, the ADO.NET team has released EF Power Tools to support the first code development, which automatically generates POCOs from your model / database (mssql only) and can completely separate POCO from other meta classes to provide information about the structure of database tables .

ADO.NET EF Proxies

When creating instances of POCO entity types, the Entity Framework often creates instances of a dynamically generated derived type that acts as a proxy for the entity. This proxy overrides some virtual properties of the entity to insert hooks for performing actions automatically when the property is accessed.

Sometimes disabling proxy creation is useful to prevent the Entity Framework from creating proxy instances. For example, serializing non-proxy instances is considerably easier than serializing proxy instances. Proxy creation can be turned off by clearing the ProxyCreationEnabled flag.

, - , , , , , - POCOs .

+3

, Dapper.NET. OR, LINQ to SQL Entity Framework.

, POCO - . .

FYI: Dapper StackOverflow, StackOverflow - peformant , .

+4

POCO / . , EF Linq2Sql, Massive, PetaPoco, Ado.Net , , nHibernate.

+1

, , .

, ( ), EF, # ( , ), , .

, , CORE Common Core.Interfaces... , (Business Logic, UI, services ..), DAL ...

, , db .., , . , EF, .

, ...

+1

All Articles