About the Author |
|
ix | |
About the Technical Reviewer |
|
xi | |
Acknowledgments |
|
xiii | |
Introduction |
|
xv | |
|
Chapter 1 Creating and Setting Up Your Project |
|
|
1 | (38) |
|
Creating Your Web Application Project |
|
|
1 | (4) |
|
|
5 | (4) |
|
Adding and Editing Razor Pages |
|
|
9 | (10) |
|
Looking at the Configuration |
|
|
19 | (4) |
|
|
23 | (6) |
|
Creating and Registering a Data Service |
|
|
29 | (5) |
|
Displaying Test Data on Your Web Page |
|
|
34 | (5) |
|
Chapter 2 Creating Models |
|
|
39 | (40) |
|
|
39 | (1) |
|
|
39 | (1) |
|
Adding the Search Form Code |
|
|
40 | (3) |
|
Implementing the Find Logic |
|
|
43 | (3) |
|
Using Model Binding and Tag Helpers |
|
|
46 | (7) |
|
|
53 | (6) |
|
Passing the Video ID Through to the Detail Page |
|
|
59 | (4) |
|
|
63 | (5) |
|
|
68 | (3) |
|
|
71 | (8) |
|
|
79 | (40) |
|
Editing Existing Data and Using Tag Helpers |
|
|
79 | (8) |
|
|
87 | (8) |
|
Changing the Data Service |
|
|
95 | (2) |
|
Validate Edited Data and Display Validation Errors |
|
|
97 | (5) |
|
AddSingleton vs. AddScoped vs. AddTransient |
|
|
102 | (1) |
|
Implementing IValidatableObject |
|
|
103 | (4) |
|
|
107 | (2) |
|
Modifying the Data Access Service |
|
|
109 | (1) |
|
Modifying the OnPost Method |
|
|
110 | (1) |
|
|
111 | (4) |
|
Changing the TempData Provider |
|
|
115 | (4) |
|
Chapter 4 EF Core and SQL Server |
|
|
119 | (30) |
|
|
119 | (1) |
|
|
120 | (4) |
|
|
124 | (1) |
|
Specify Database Connection Strings |
|
|
125 | (7) |
|
Working with Database Migrations |
|
|
132 | (10) |
|
Implement a New Data Access Service |
|
|
142 | (3) |
|
Changing the Data Access Service Registration |
|
|
145 | (4) |
|
Chapter 5 Working with Razor Pages |
|
|
149 | (34) |
|
Using Sections in Your Razor Pages |
|
|
149 | (2) |
|
|
151 | (1) |
|
|
152 | (1) |
|
|
152 | (1) |
|
|
152 | (1) |
|
Scripts Applied Across All Pages |
|
|
152 | (1) |
|
|
152 | (3) |
|
What Are_Viewlmports and_ViewStart Files? |
|
|
155 | (2) |
|
Specifying a Different Layout Page |
|
|
157 | (4) |
|
Creating a Custom TagHelper |
|
|
161 | (4) |
|
Working with Partial Views |
|
|
165 | (2) |
|
Adding Video Properties and Updating the Database |
|
|
167 | (3) |
|
Adding Markup to the Partial View |
|
|
170 | (6) |
|
Working with ViewComponents |
|
|
176 | (7) |
|
Chapter 6 Adding Client-Side Logic |
|
|
183 | (42) |
|
Separate Production Scripts from Development Scripts |
|
|
183 | (4) |
|
Setting Up SCSS and Generating CSS |
|
|
187 | (12) |
|
|
199 | (2) |
|
|
201 | (3) |
|
|
204 | (4) |
|
|
208 | (4) |
|
Working with Chrome Developer Tools |
|
|
212 | (1) |
|
|
213 | (2) |
|
Adding and Modifying Styles |
|
|
215 | (3) |
|
|
218 | (1) |
|
|
219 | (2) |
|
|
221 | (2) |
|
|
223 | (2) |
|
Chapter 7 Exploring Middleware |
|
|
225 | (32) |
|
|
225 | (2) |
|
|
227 | (1) |
|
|
228 | (2) |
|
|
230 | (1) |
|
|
230 | (2) |
|
|
232 | (1) |
|
|
232 | (1) |
|
UseEndpoints with MapRazorPages |
|
|
233 | (1) |
|
Creating Custom Middleware |
|
|
233 | (5) |
|
|
238 | (6) |
|
Only Logging What Is Necessary |
|
|
244 | (3) |
|
Applying a Specific LogLevel to Production |
|
|
247 | (7) |
|
A Quick Look at the Log Category |
|
|
254 | (1) |
|
|
255 | (2) |
|
Chapter 8 Web Application Deployment |
|
|
257 | (28) |
|
Getting Your Site Ready for Deployment |
|
|
257 | (8) |
|
Deploying Your Web Application to IIS |
|
|
265 | (6) |
|
Configuring the SQL Server Database |
|
|
271 | (12) |
|
A Note About Connection Strings and Secrets |
|
|
283 | (2) |
Index |
|
285 | |