About the Authors |
|
xix | |
About the Technical Reviewer |
|
xxi | |
Acknowledgments |
|
xxiii | |
Introduction |
|
xxv | |
|
Part I Visual Studio 2017 and .NET Core |
|
|
1 | (208) |
|
Chapter 1 Introducing Entity Framework Core |
|
|
3 | (46) |
|
|
4 | (1) |
|
Installing Visual Studio 2017 and .NET Core |
|
|
5 | (3) |
|
|
5 | (1) |
|
Installing the .NET Core SDKs |
|
|
6 | (2) |
|
The NET Core Command Line Interface (CLI) |
|
|
8 | (1) |
|
Creating and Configuring the Solution and Projects |
|
|
8 | (5) |
|
Creating the Solution and Projects |
|
|
8 | (3) |
|
Changes to the Project Files |
|
|
11 | (1) |
|
Updating the Target Framework |
|
|
11 | (2) |
|
Working with NuGet Packages |
|
|
13 | (1) |
|
Manually Restoring Packages |
|
|
13 | (1) |
|
Adding the Project References |
|
|
14 | (1) |
|
Adding Entity Framework Core |
|
|
14 | (3) |
|
Adding EF Packages to the SpyStore.DAL Project |
|
|
14 | (2) |
|
Installing/Updating Packages Using the SpyStore.DALcsproj File |
|
|
16 | (1) |
|
Adding EF Packages to the SpyStoraModels Project |
|
|
16 | (1) |
|
Adding Packages to the SpyStore.DAL.Tests Project |
|
|
17 | (1) |
|
|
17 | (9) |
|
Understanding the DbContext Class |
|
|
17 | (5) |
|
Building the Base Entity Class |
|
|
22 | (2) |
|
Adding the Category Model Class |
|
|
24 | (2) |
|
Adding the Categories DbSet |
|
|
26 | (1) |
|
|
26 | (5) |
|
Executing EF NET CLI Commands |
|
|
27 | (1) |
|
Creating the First Migration |
|
|
27 | (2) |
|
|
29 | (1) |
|
Creating Migration SQL Scripts |
|
|
30 | (1) |
|
Understanding CRUD Operations Using Entity Framework |
|
|
31 | (3) |
|
|
31 | (1) |
|
|
31 | (1) |
|
|
32 | (1) |
|
|
33 | (1) |
|
|
34 | (7) |
|
Creating the CategoryTests Class |
|
|
34 | (3) |
|
Testing EF CRUD Operations |
|
|
37 | (4) |
|
Adding the Core Repository Interface and Base Class |
|
|
41 | (6) |
|
Adding the IRepo Interface |
|
|
41 | (2) |
|
Adding the Base Repository |
|
|
43 | (3) |
|
Adding the Category Repository |
|
|
46 | (1) |
|
|
47 | (2) |
|
Chapter 2 Building the Data Access Layer with Entity Framework Core |
|
|
49 | (34) |
|
|
49 | (1) |
|
Navigation Properties and Foreign Keys |
|
|
50 | (1) |
|
|
51 | (1) |
|
Mixing EF with Stored Procedures and Functions |
|
|
51 | (1) |
|
Finishing the Model Classes |
|
|
52 | (6) |
|
Updating the Category Model |
|
|
52 | (1) |
|
|
52 | (1) |
|
Adding the Shopping Cart Record Model |
|
|
53 | (1) |
|
|
54 | (1) |
|
Adding the Order Detail Model |
|
|
54 | (1) |
|
Adding the Customer Model |
|
|
55 | (1) |
|
Updating the StoreContext |
|
|
56 | (2) |
|
Updating the Database to Match the Model |
|
|
58 | (1) |
|
|
58 | (1) |
|
|
58 | (1) |
|
Adding the Stored Procedure and User Defined Function |
|
|
58 | (2) |
|
|
59 | (1) |
|
Implementing the Up() Method |
|
|
59 | (1) |
|
Implementing the Down() Method |
|
|
60 | (1) |
|
|
60 | (1) |
|
Adding the OrderTotal Calculated Field |
|
|
60 | (1) |
|
|
60 | (1) |
|
Making OrderTotal a Computed Column |
|
|
60 | (1) |
|
Adding a New Migration and Update the Database |
|
|
61 | (1) |
|
Automating the Migrations |
|
|
61 | (1) |
|
|
62 | (2) |
|
The Product with Category View Model |
|
|
62 | (1) |
|
The Order Detail with Product Info View Model |
|
|
63 | (1) |
|
The Order with OrderDetails View Model |
|
|
63 | (1) |
|
The Cart Record with Product Info View Model |
|
|
64 | (1) |
|
Completing the Repositories |
|
|
64 | (11) |
|
|
64 | (3) |
|
Adding/Updating the Repositories |
|
|
67 | (8) |
|
Initializing the Database with Data |
|
|
75 | (6) |
|
|
76 | (2) |
|
|
78 | (2) |
|
Using the Initializer in Tests |
|
|
80 | (1) |
|
Creating NuGet Packages for the Data Access Library |
|
|
81 | (1) |
|
Setting the NuGet Properties |
|
|
81 | (1) |
|
Creating the NuGet Packages |
|
|
81 | (1) |
|
|
82 | (1) |
|
Chapter 3 Building the RESTful Service with ASP.NET Core MVC Services |
|
|
83 | (36) |
|
Introducing the MVC Pattern |
|
|
83 | (1) |
|
|
83 | (1) |
|
|
83 | (1) |
|
|
84 | (1) |
|
Introducing ASP.NET Core MVC Web API |
|
|
84 | (3) |
|
ASP.NET Core and NET Core |
|
|
84 | (1) |
|
|
85 | (1) |
|
Determining the Runtime Environment |
|
|
85 | (1) |
|
|
86 | (1) |
|
Creating the Solution and the Core MVC Project |
|
|
87 | (5) |
|
Adding the Package Source for the Data Access Layer |
|
|
90 | (1) |
|
Updating and Adding NuGet Packages |
|
|
90 | (1) |
|
The ASP.NET Core "Super" Packages |
|
|
91 | (1) |
|
|
92 | (10) |
|
|
92 | (1) |
|
The appsettings.json File(s) |
|
|
93 | (1) |
|
The runtimeconfig.template.json File |
|
|
94 | (1) |
|
|
94 | (6) |
|
|
100 | (1) |
|
|
100 | (1) |
|
|
101 | (1) |
|
The launchsettings.json File |
|
|
101 | (1) |
|
|
102 | (6) |
|
|
102 | (1) |
|
|
102 | (2) |
|
|
104 | (4) |
|
|
108 | (2) |
|
Creating the SpyStoreExceptionFilter |
|
|
108 | (2) |
|
Adding the Exception Filter for All Actions |
|
|
110 | (1) |
|
|
110 | (8) |
|
|
111 | (1) |
|
|
112 | (1) |
|
|
113 | (1) |
|
|
113 | (1) |
|
|
114 | (1) |
|
The Shopping Cart Controller |
|
|
115 | (3) |
|
Using the Combined Solution |
|
|
118 | (1) |
|
|
118 | (1) |
|
|
118 | (1) |
|
Chapter 4 Introducing ASP.NET Core MVC Web Applications |
|
|
119 | (38) |
|
Introducing the "V" in ASP.NET Core MVC |
|
|
119 | (1) |
|
Creating the Solution and the Core MVC Project |
|
|
120 | (3) |
|
Updating and Adding NuGet Packages |
|
|
122 | (1) |
|
|
123 | (1) |
|
|
123 | (1) |
|
URL Templates and Default Values |
|
|
123 | (1) |
|
MVC Web Applications Projects and Files |
|
|
124 | (5) |
|
|
124 | (1) |
|
The appsettings.json File |
|
|
124 | (1) |
|
|
124 | (2) |
|
|
126 | (1) |
|
|
126 | (1) |
|
|
126 | (3) |
|
Controllers, Actions, and Views |
|
|
129 | (6) |
|
|
129 | (1) |
|
|
130 | (3) |
|
|
133 | (1) |
|
|
134 | (1) |
|
|
134 | (1) |
|
Package Management with Bower |
|
|
135 | (2) |
|
Updating and Adding Bower Packages |
|
|
136 | (1) |
|
|
136 | (1) |
|
Bundling and Minification |
|
|
137 | (5) |
|
The BundlerMinifier Project |
|
|
137 | (1) |
|
Configuring Bundling and Minification |
|
|
137 | (2) |
|
Visual Studio Integration |
|
|
139 | (2) |
|
.NET Core CLI Integration |
|
|
141 | (1) |
|
Creating the Web Service Locator |
|
|
142 | (1) |
|
Creating the IWebServiceLocator Interface |
|
|
142 | (1) |
|
Creating the WebServiceLocator Class |
|
|
142 | (1) |
|
Adding the WebServiceLocator Class to the Dl Container |
|
|
143 | (1) |
|
Creating the WebAPICalls Class to Call the Web API Service |
|
|
143 | (8) |
|
Creating the IWebApiCalls Interface |
|
|
143 | (1) |
|
Creating the Base Class Code |
|
|
144 | (4) |
|
Creating the WebApiCalls Class |
|
|
148 | (3) |
|
Adding WebApiCalls Class to the Dl Container |
|
|
151 | (1) |
|
Adding the Fake Authentication |
|
|
151 | (3) |
|
Building the Authentication Helper |
|
|
151 | (1) |
|
Adding the AuthHelper Class to the Dl Container |
|
|
152 | (1) |
|
Creating the Action Filter for the Fake Authentication |
|
|
152 | (2) |
|
Adding the Action Filter for All Actions |
|
|
154 | (1) |
|
|
154 | (2) |
|
|
156 | (1) |
|
Chapter 5 Building the SpyStore Application with ASP.NET Core MVC |
|
|
157 | (52) |
|
|
157 | (7) |
|
|
159 | (1) |
|
|
160 | (1) |
|
|
160 | (1) |
|
|
160 | (1) |
|
|
161 | (1) |
|
|
161 | (1) |
|
The Validation Tag Helpers |
|
|
162 | (1) |
|
The Link and Script Tag Helpers |
|
|
163 | (1) |
|
|
163 | (1) |
|
The Environment Tag Helper |
|
|
163 | (1) |
|
|
163 | (1) |
|
|
164 | (12) |
|
|
165 | (3) |
|
|
168 | (2) |
|
The Shopping Cart Controller |
|
|
170 | (6) |
|
|
176 | (7) |
|
|
176 | (4) |
|
|
180 | (2) |
|
|
182 | (1) |
|
|
183 | (4) |
|
Building the Server Side Code |
|
|
183 | (3) |
|
Building the Client Side Code |
|
|
186 | (1) |
|
|
186 | (1) |
|
Invoking View Components as Custom Tag Helpers |
|
|
186 | (1) |
|
Updating and Adding the Views |
|
|
187 | (18) |
|
|
187 | (1) |
|
|
187 | (8) |
|
|
195 | (5) |
|
|
200 | (3) |
|
|
203 | (2) |
|
|
205 | (2) |
|
|
205 | (1) |
|
Using the .NET Command Line Interface (CLI) |
|
|
206 | (1) |
|
Using the Combined Solutions |
|
|
206 | (1) |
|
|
207 | (2) |
|
Part II Client-Side Tooling and JavaScript Frameworks |
|
|
209 | (180) |
|
Chapter 6 JavaScript Application Tools |
|
|
211 | (30) |
|
What Tools Are We Covering? |
|
|
211 | (1) |
|
|
212 | (8) |
|
Manually Installing Node.js |
|
|
212 | (1) |
|
Installing Node using the Chocolatey Package Manager |
|
|
213 | (1) |
|
Setting Up Visual Studio to Use the Latest Version of Node |
|
|
213 | (1) |
|
Getting Started with Node.js |
|
|
214 | (1) |
|
|
215 | (2) |
|
Saving Project Dependencies |
|
|
217 | (1) |
|
|
218 | (2) |
|
Installing Packages Locally vs. Globally |
|
|
220 | (1) |
|
|
220 | (7) |
|
|
222 | (1) |
|
Installing Bower Prerequisites |
|
|
222 | (1) |
|
|
222 | (1) |
|
|
222 | (1) |
|
|
223 | (1) |
|
Installing Bower Packages |
|
|
223 | (1) |
|
Installing Bower Packages Using Visual Studio |
|
|
224 | (3) |
|
|
227 | (6) |
|
|
228 | (1) |
|
|
229 | (1) |
|
|
230 | (1) |
|
Task Runner Explorer Within Visual Studio |
|
|
231 | (1) |
|
|
232 | (1) |
|
|
233 | (7) |
|
|
234 | (1) |
|
|
235 | (2) |
|
|
237 | (3) |
|
|
240 | (1) |
|
Chapter 7 Introduction to Typescript |
|
|
241 | (40) |
|
|
241 | (1) |
|
|
242 | (37) |
|
An Overview of TypeScript Syntax |
|
|
242 | (11) |
|
Implementing a Basic TypeScript Application |
|
|
253 | (1) |
|
Setting Up a Sample Project |
|
|
254 | (3) |
|
Working with TypeScript Files |
|
|
257 | (2) |
|
|
259 | (2) |
|
|
261 | (18) |
|
|
279 | (2) |
|
|
281 | (48) |
|
Creating a New Visual Studio Core Project |
|
|
281 | (7) |
|
|
284 | (1) |
|
Setting Up the Startup Class |
|
|
284 | (2) |
|
|
286 | (1) |
|
|
287 | (1) |
|
|
287 | (1) |
|
Main SpyStore App Component Setup |
|
|
288 | (5) |
|
Creating the Root index.html Page |
|
|
289 | (2) |
|
Creating the Root App Component |
|
|
291 | (1) |
|
|
292 | (1) |
|
Creating the Angular Bootstrap |
|
|
292 | (1) |
|
|
293 | (10) |
|
Application Initialization |
|
|
293 | (1) |
|
|
294 | (1) |
|
|
295 | (2) |
|
|
297 | (3) |
|
|
300 | (3) |
|
Building the SpyStore Angular App |
|
|
303 | (25) |
|
|
303 | (3) |
|
|
306 | (5) |
|
|
311 | (2) |
|
|
313 | (3) |
|
|
316 | (4) |
|
|
320 | (6) |
|
|
326 | (2) |
|
|
328 | (1) |
|
|
329 | (60) |
|
|
329 | (1) |
|
Creating a New Visual Studio Core Project |
|
|
330 | (2) |
|
|
332 | (1) |
|
Setting Up the Startup Class |
|
|
333 | (1) |
|
|
334 | (3) |
|
|
337 | (1) |
|
|
338 | (4) |
|
|
342 | (9) |
|
|
351 | (37) |
|
|
351 | (4) |
|
|
355 | (1) |
|
|
356 | (1) |
|
|
357 | (4) |
|
|
361 | (1) |
|
|
362 | (3) |
|
|
365 | (4) |
|
|
369 | (2) |
|
|
371 | (5) |
|
|
376 | (4) |
|
|
380 | (4) |
|
|
384 | (3) |
|
|
387 | (1) |
|
|
388 | (1) |
Index |
|
389 | |