Guide to Entity Framework with



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

DeferredLoadingEnabled
property. Please check out this URL for more information 
on lazy loading 
http://msdn.microsoft.com/en-us/library/vstudio/
dd456846(v=vs.100).aspx
.
Deferred loading works with both code-generated entities as well as your 
Plain Old CLR Objects—commonly known as POCO entities.
Support for POCO change tracking
Entity Framework 6 enables you to easily track changes to POCOs. Note that Entity 
Framework 6.0 provides support for the deferred or lazy loading of entities with
POCO classes through the usage of proxy types. Here is an example:
var result = (from emp in PayrollDataContext.Employee
.Include("Department") where emp.DepartmentID == 12 select
emp).Single();
Please check out this URL to find out more about lazy loading:
http://msdn.microsoft.com/en-us/library/vstudio/dd456846(v=vs.100).
aspx
We will explore more about POCO classes and lazy loading later in this book.


Introducing the ADO.NET Entity Framework
[
 24 
]
Better n-tier support with self-tracking entities
Entity Framework 6 provides better n-tier support and support for self-tracking 
entities. Self-tracking entities are those that enable each entity to track any changes 
to themselves so that you can pass it across process boundaries and persist the entire 
object graph. Entity Framework 6 includes T4 templates to generate entities that have 
the ability to track their own changes on the client side.
Support for code-first, model-first, and 
database-first approaches
Entity Framework 6 now enables you to generate your Data Model from
the conceptual model. You can now create your entities and then use Visual 
Studio 2013 to generate the database based on a predefined conceptual model.
In the code-first approach, the domain model is first defined using POCO classes 
and then the database is created from these classes. This approach is popular and 
provides much more control over your code—you just need to define the database 
mappings and leave the creation of the database entirely to Entity Framework. 
Note that as your code drives the database, manual changes to the database are not 
recommended in this approach.
The figure given next illustrates the three approaches and why and when each 
should be used:
Use Model Designer?
Code First
Approach
Model First
Approach
Database
First
Approach
No
No
Yes
Yes
Yes
No
Use Database?
Use POCOs?


Chapter 1

Download 11,91 Mb.

Do'stlaringiz bilan baham:
1   ...   27   28   29   30   31   32   33   34   ...   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