Guide to Entity Framework with


] 8. Click on  New Connection



Download 11,91 Mb.
Pdf ko'rish
bet40/48
Sana30.03.2022
Hajmi11,91 Mb.
#517122
TuriGuide
1   ...   36   37   38   39   40   41   42   43   ...   48
Bog'liq
Entity Framework Tutorial, Second Edition (1)

]
8. Click on 
New Connection
. Now you will need to specify the connection 
properties and parameters for the database to connect to. In our example,
the database is 
Security
.
We will use a dot to specify the database server name. This implies that 
we will be using the database server of the localhost, which is the current 
system in use. You can also specify the server name here if your database 
resides on a different system. If your database resides on a different 
server, you need to specify the server name here.
9. After you specify the necessary user name, password, and server name, you 
can test your connection using the 
Test Connection
button. When you do so, 
the message 
Test connection succeeded
gets displayed in the message box, 
as shown in the following screenshot:
Testing the database connection


Chapter 2
[
 39 
]
Note that the entity connection string is generated automatically. This 
connection string will be saved in the 
ConnectionStrings
section of 
your application's 
web.config
file. This is what it will look like:

connectionString="metadata=res://*/SecurityDB.
csdl|res:/
/*/SecurityDB.ssdl|res://*/SecurityDB.
msl;provider=Syste
m.Data.SqlClient;provider connection string="data
source=.;initial catalog=SecurityDB;user
id=sa;password=sa1@3;MultipleActiveResultSets=True;App=
EntityFramework""
providerName="System.Data.EntityClient" />

10. Now, click on 
Next
and specify the database objects you would like to 
have in your model from the 

Download 11,91 Mb.

Do'stlaringiz bilan baham:
1   ...   36   37   38   39   40   41   42   43   ...   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