Guide to Entity Framework with



Download 11,91 Mb.
Pdf ko'rish
bet34/48
Sana30.03.2022
Hajmi11,91 Mb.
#517122
TuriGuide
1   ...   30   31   32   33   34   35   36   37   ...   48
Bog'liq
Entity Framework Tutorial, Second Edition (1)

[
 28 
]
The other enhancements in Entity Framework are shown as follows:
• 
Task-based asynchronous operation
: This allows Entity Framework to 
take advantage of .NET 4.5 asynchronous support with asynchronous 
queries, updates, and so on. Entity Framework 6 now provides support for a 
simplified approach to asynchronous programming. Entity Framework 6 can 
now be used to run async queries and also save data asynchronously.
• 
Enhanced support for stored procedures and functions in code first
: This 
feature allows you to map stored procedures and database functions by 
using the code-first APIs.
• 
Support for custom code first conventions
: This is a feature that allows you 
to write and register custom code conventions with code first.
Note that the third-party providers for Entity Framework 5 are not 
compatible with Entity Framework 6. This implies that if you are using 
the SQL Server or SQL Server Compact editions, you should update the 
database providers.
Performance improvements in Entity 
Framework 6
In Entity Framework 6, query performance has been improved a lot. One important 
performance improvement is in precompiled queries. A compiled query is one 
that is stored as a parsed tree in memory so that it needn't be regenerated with 
every subsequent call. You can create compiled queries in two ways: creating an 
ObjectQuery
class with 
EntitySQL
and also using the 
CompiledQuery.Compile
function. Compiling expression trees into SQL every time is an overhead particularly 
for queries that are complex. This is exactly why compiled queries were introduced.
The earlier versions of Entity Framework contained the 
CompiledQuery
class that 
you could use to precompile the query and then execute the query as and when 
needed. So, in essence, when using precompiled queries, the SQL to be executed is 
figured out only once (during precompilation) and this is then reused each time the 
compiled query is executed.
Note that if you are using 
CompiledQuery
, you should make sure that 
you are using the query more than once. This is because it is more costly 
than querying data the first time.


Chapter 1

Download 11,91 Mb.

Do'stlaringiz bilan baham:
1   ...   30   31   32   33   34   35   36   37   ...   48




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish