Guide to Entity Framework with



Download 11,91 Mb.
Pdf ko'rish
bet47/48
Sana30.03.2022
Hajmi11,91 Mb.
#517122
TuriGuide
1   ...   40   41   42   43   44   45   46   47   48
Bog'liq
Entity Framework Tutorial, Second Edition (1)

[
 49 
]
Refer to the solution we created earlier using the Entity Data Model Designer. Now 
follow these steps:
1. Drag and drop an 
EntityDataSource
control from the toolbox onto your 
Default.aspx
web form:
The EntityDataSource Control


Getting Started
[
 50 
]
2. Now click on the 
Configure Data Source...
option to specify the data source. 
Refer to the following screenshot:
Configuring the EntityDataSource Control
3. Specify the 
ConnectionString
and 
DefaultContainerName
fields, and then 
click on 
Next
:


Chapter 2
[
 51 
]
4. Specify the 
fields you want to retrieve from the database table, and click on 
Finish
when done:
Configuring the data selection
5. Now drag and drop a GridView control from the toolbox onto the
Default.aspx
web form.


Getting Started
[
 52 
]
6. Next, use the 
Choose Data Source
option of the GridView control to associate 
its data source with the EntityDataSource control we created earlier. Refer to 
the following screenshot:
Configuring the Data Source property of the GridView control
This is how the markup code of the GridView control looks with its templates 
defined. Note how the DataSourceID of the GridView control has been associated 
with the EntityDataSource control we created earlier.
EntityDataSource control we created earlier.
AutoGenerateColumns="False" DataSourceID="EntityDataSource1">

HeaderText="UserAuthenticationID" ReadOnly="True" 
SortExpression="UserAuthenticationID" />
DataField="UserAuthenticationTypeID" 
HeaderText="UserAuthenticationTypeID" 
ReadOnly="True" 
SortExpression="UserAuthenticationTypeID" />
HeaderText="UserID" ReadOnly="True" 
SortExpression="UserID" />
HeaderText="UserName" ReadOnly="True" 
SortExpression="UserName" />




Chapter 2

Download 11,91 Mb.

Do'stlaringiz bilan baham:
1   ...   40   41   42   43   44   45   46   47   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