About the Author |
|
xi | |
About the Technical Reviewer |
|
xiii | |
Introduction |
|
xv | |
Part I: Getting Started |
|
1 | (22) |
|
|
3 | (12) |
|
|
3 | (2) |
|
|
5 | (4) |
|
|
9 | (3) |
|
Install the Core Tools Package |
|
|
12 | (1) |
|
|
13 | (1) |
|
|
14 | (1) |
|
Chapter 2 Project Structure |
|
|
15 | (8) |
|
|
15 | (3) |
|
|
18 | (1) |
|
Data Access Layer Project |
|
|
19 | (1) |
|
|
20 | (1) |
|
|
20 | (3) |
Part II: Core Features |
|
23 | (108) |
|
|
25 | (12) |
|
|
25 | (1) |
|
|
26 | (1) |
|
Simple Navigation Property |
|
|
26 | (1) |
|
Entity Property Constraints |
|
|
27 | (2) |
|
|
29 | (2) |
|
More Entity Schema Attributes |
|
|
31 | (1) |
|
Mapping of the Primary Key Column |
|
|
31 | (1) |
|
|
32 | (1) |
|
Entity Inheritance Mapping |
|
|
33 | (1) |
|
|
33 | (1) |
|
|
34 | (2) |
|
|
36 | (1) |
|
Chapter 4 Database Context |
|
|
37 | (8) |
|
Creating a Simple Database Context |
|
|
37 | (1) |
|
Connecting to Our Database |
|
|
37 | (2) |
|
Accessing Entities in a Database Context |
|
|
39 | (1) |
|
|
40 | (1) |
|
Configuring a Database Context |
|
|
40 | (3) |
|
Set a Database Schema for All Entities |
|
|
40 | (1) |
|
|
41 | (1) |
|
|
41 | (1) |
|
|
42 | (1) |
|
Foreign Key Relationships |
|
|
43 | (1) |
|
|
43 | (2) |
|
Chapter 5 Creating a Database from Code |
|
|
45 | (12) |
|
Setting the Connection String |
|
|
45 | (3) |
|
Creating the Initial Migration |
|
|
48 | (5) |
|
Creating the Database from the Migration |
|
|
53 | (1) |
|
Connect to the New Database from Visual Studio |
|
|
54 | (2) |
|
|
56 | (1) |
|
|
57 | (8) |
|
|
57 | (6) |
|
|
63 | (1) |
|
|
64 | (1) |
|
|
64 | (1) |
|
|
65 | (12) |
|
|
65 | (4) |
|
|
66 | (1) |
|
Select Object Transformation |
|
|
66 | (1) |
|
|
67 | (1) |
|
Select the Navigation Property |
|
|
68 | (1) |
|
|
68 | (1) |
|
|
69 | (1) |
|
|
70 | (5) |
|
|
75 | (2) |
|
|
77 | (10) |
|
Inserting the Root Entity |
|
|
77 | (1) |
|
|
78 | (2) |
|
|
80 | (1) |
|
Identity Seeded Primary Key |
|
|
80 | (1) |
|
|
80 | (1) |
|
|
80 | (1) |
|
|
80 | (1) |
|
|
81 | (1) |
|
Record Insertion Integration Tests |
|
|
81 | (4) |
|
|
85 | (2) |
|
|
87 | (10) |
|
|
87 | (1) |
|
|
88 | (1) |
|
|
89 | (6) |
|
|
95 | (2) |
|
|
97 | (8) |
|
|
97 | (1) |
|
|
97 | (4) |
|
|
98 | (1) |
|
Client Set Null Delete Behavior |
|
|
99 | (1) |
|
|
100 | (1) |
|
|
101 | (1) |
|
|
101 | (3) |
|
|
104 | (1) |
|
Chapter 11 Navigation Properties |
|
|
105 | (26) |
|
Mapping a Parent Entity in a One-to-Many Relationship |
|
|
105 | (1) |
|
Mapping a Related Entity to Parent |
|
|
106 | (1) |
|
One-to-Many Integration Test |
|
|
107 | (3) |
|
Many-to-Many Relationships |
|
|
110 | (20) |
|
Map a Relationship Through Navigation Properties |
|
|
110 | (1) |
|
|
111 | (3) |
|
Many-to-Many Integration Test |
|
|
114 | (16) |
|
|
130 | (1) |
Part III: Advanced Features |
|
131 | (32) |
|
|
133 | (12) |
|
|
133 | (1) |
|
|
134 | (1) |
|
|
135 | (2) |
|
|
137 | (1) |
|
|
137 | (1) |
|
|
138 | (1) |
|
|
138 | (1) |
|
|
138 | (1) |
|
|
139 | (4) |
|
|
139 | (1) |
|
|
140 | (1) |
|
|
140 | (1) |
|
|
141 | (1) |
|
|
142 | (1) |
|
|
142 | (1) |
|
|
143 | (2) |
|
Chapter 13 Stored Procedures |
|
|
145 | (8) |
|
Add Stored Procedures to a Database |
|
|
145 | (4) |
|
|
149 | (1) |
|
Test the GetPersonsByState Stored Procedure |
|
|
150 | (1) |
|
Test the AddLookUpltem Stored Procedure |
|
|
151 | (1) |
|
|
152 | (1) |
|
|
153 | (10) |
|
|
153 | (1) |
|
|
153 | (1) |
|
|
154 | (1) |
|
|
154 | (1) |
|
|
154 | (1) |
|
Change a Column in a Table |
|
|
155 | (1) |
|
|
155 | (3) |
|
|
155 | (1) |
|
|
156 | (1) |
|
Update Data in a Migration |
|
|
157 | (1) |
|
|
158 | (1) |
|
Update to the Most Recent Migration |
|
|
159 | (1) |
|
Migrate to a Specific Migration |
|
|
159 | (1) |
|
|
159 | (1) |
|
Automatic Data Migrations |
|
|
159 | (2) |
|
|
161 | (2) |
Part IV: A Model Web Application |
|
163 | (144) |
|
Chapter 15 Authentication on the Web |
|
|
165 | (16) |
|
Install Identity NuGet Packages |
|
|
165 | (1) |
|
Initialize Identity on App Startup |
|
|
166 | (6) |
|
|
172 | (2) |
|
|
174 | (1) |
|
|
175 | (5) |
|
|
180 | (1) |
|
Chapter 16 Displaying Data on the Web |
|
|
181 | (24) |
|
|
181 | (2) |
|
Generated List View and Model |
|
|
183 | (4) |
|
Generated Details View and Model |
|
|
187 | (3) |
|
Adding Addresses to the Details View |
|
|
190 | (4) |
|
Adding Contacts to Navigation |
|
|
194 | (3) |
|
|
197 | (2) |
|
|
199 | (4) |
|
|
203 | (2) |
|
Chapter 17 Inserting Data on the Web |
|
|
205 | (28) |
|
Generated Create Razor Page |
|
|
205 | (5) |
|
|
205 | (2) |
|
|
207 | (2) |
|
|
209 | (1) |
|
|
210 | (13) |
|
|
210 | (4) |
|
|
214 | (5) |
|
Update the Razor Page Model |
|
|
219 | (2) |
|
|
221 | (2) |
|
|
223 | (8) |
|
|
223 | (3) |
|
|
226 | (5) |
|
|
231 | (2) |
|
Chapter 18 Updating Data on the Web |
|
|
233 | (16) |
|
Generated Edit Razor Page View |
|
|
233 | (2) |
|
Generated Edit Razor Model |
|
|
235 | (3) |
|
Add a Friendly Address Update |
|
|
238 | (10) |
|
|
238 | (4) |
|
|
242 | (5) |
|
|
247 | (1) |
|
|
248 | (1) |
|
Chapter 19 Deleting Data on the Web |
|
|
249 | (16) |
|
Generated Delete Razor Page View |
|
|
249 | (2) |
|
|
251 | (2) |
|
Updating Page Controller Code to Delete Addresses |
|
|
253 | (2) |
|
|
255 | (1) |
|
Showing a Person's Address on the Delete Form |
|
|
256 | (7) |
|
Update the Page Controller |
|
|
256 | (1) |
|
|
257 | (6) |
|
|
263 | (2) |
|
Chapter 20 Reporting on the Web |
|
|
265 | (16) |
|
|
265 | (1) |
|
|
266 | (1) |
|
|
267 | (2) |
|
|
269 | (3) |
|
|
272 | (1) |
|
|
272 | (7) |
|
|
272 | (3) |
|
Adding Pagination Support |
|
|
275 | (2) |
|
Updating the Model for Pagination |
|
|
277 | (1) |
|
Add Pagination to the Razor View |
|
|
278 | (1) |
|
Running the Finished Report |
|
|
279 | (1) |
|
|
279 | (2) |
|
Chapter 21 Authorization on the Web |
|
|
281 | (26) |
|
|
281 | (1) |
|
|
281 | (1) |
|
Add and Assign Roles on Startup |
|
|
282 | (2) |
|
|
284 | (21) |
|
Authorize the Contacts Menu Item |
|
|
285 | (2) |
|
|
287 | (18) |
|
|
305 | (2) |
Part V: Learning More |
|
307 | (6) |
|
Chapter 22 Delving Deeper |
|
|
309 | (2) |
|
|
311 | (2) |
Index |
|
313 | |