Guide to Entity Framework with



Download 11,91 Mb.
Pdf ko'rish
bet20/48
Sana30.03.2022
Hajmi11,91 Mb.
#517122
TuriGuide
1   ...   16   17   18   19   20   21   22   23   ...   48
Bog'liq
Entity Framework Tutorial, Second Edition (1)

[
 9 
]
using NHibernate;
using FluentNHibernate.Cfg.Db;
using FluentNHibernate.Automapping;
using NHibernate.Cfg;
using NHibernate.Tool.hbm2ddl;
using System.Reflection;
namespace Packt
{
public static class DataManager
{
private static ISessionFactory sessionFactory = null;
private static readonly string businessObjectsNamespace = 
"Packt.Entity.Mappings";
private static readonly string connectionString = @"Data 
Source=JOYDIP-PC\SQLServer2014;
Initial Catalog=Security;Integrated Security=True";
private static ISessionFactory SessionFactory
{
get
{
if (_sessionFactory == null)
{
//Code to create a new session factory instance and load the 
business entities
}
return sessionFactory;
}
}
public static ISession OpenSession()
{
return SessionFactory.OpenSession();
}
}
}
Note that you can make a call to 
DataManager.OpenSession()
to open the database 
connectivity session.
Entity Framework 6 is a mature ORM and comes up with many powerful features. 
When you use Entity Framework, you can concentrate more on writing application 
logic rather than writing the database connectivity code. This reduces development 
time and effort greatly.


Introducing the ADO.NET Entity Framework
[
 10 
]
Language Integrated Query
(
LINQ
) is a query translation pipeline that you can 
use to integrate your queries into the object model. LINQ provides you with a 
framework that you can use to access relational data in a strongly typed way.
LINQ provides a great way to query in-memory objects.
Here are the various forms that LINQ comes up with:
• 

Download 11,91 Mb.

Do'stlaringiz bilan baham:
1   ...   16   17   18   19   20   21   22   23   ...   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