WEBVTT

00:00.000 --> 00:05.550
Okay, we've now reached the end of section seven and we've implemented our shopping cart feature.

00:05.550 --> 00:11.280
So just to recap, we've now got that feature added and enabled in our application.

00:11.280 --> 00:16.890
And we took a look at our different storage options for the shopping cart and many viable options for

00:16.890 --> 00:17.580
this actually.

00:17.580 --> 00:23.730
But I chose for this particular training course to use the database to store it, just to take advantage

00:23.730 --> 00:26.460
of relational database features.

00:26.460 --> 00:31.830
But we could have gone an entirely different approach, and they would all be viable in their own ways.

00:31.830 --> 00:36.930
And it could also be enhanced because we're not tracking what somebody is actually putting in and taking

00:36.930 --> 00:38.100
out of their basket.

00:38.100 --> 00:44.880
There are options to track events, such as when somebody is adding something and removing something

00:44.880 --> 00:50.760
from their basket and storing that information in a database so that our marketing department, if we

00:50.760 --> 00:56.850
had one, could come along at a future point and find out what's going on for marketing purposes.

00:56.880 --> 01:02.220
Also, we've taken a look at Entity Framework relationships, and we took a look at one way of setting

01:02.220 --> 01:06.150
this up, and that's simply to use Entity Framework conventions.

01:06.150 --> 01:10.590
So the Entity Framework works out how the relationship should be configured.

01:10.590 --> 01:13.140
There are alternative approaches to this as well.

01:13.140 --> 01:14.970
We can do it by configuration.

01:14.970 --> 01:21.110
I've just chosen to do it by convention for our purposes today, but there are equally viable options,

01:21.110 --> 01:24.380
and configuration would also be a good way to do it.

01:24.410 --> 01:26.720
You don't gain anything by doing it that way.

01:26.720 --> 01:29.120
It's just an alternative approach.

01:29.120 --> 01:31.730
And we've also taken a look at shaping data.

01:31.730 --> 01:39.470
So when we do have related tables of course, then serializing that data into JSON that we then return

01:39.500 --> 01:41.360
needs special handling.

01:41.360 --> 01:44.120
And that's what we did with Dtos in this case.

01:44.120 --> 01:48.260
So just one frequently asked question mapping code is tedious.

01:48.290 --> 01:51.470
Are we going to use Automapper at any point during this course?

01:51.470 --> 01:54.350
Some developers love it, some developers do not like it.

01:54.380 --> 01:56.240
We are going to implement it.

01:56.240 --> 02:01.550
But later on, towards the end of the course when we take a look at Crud operations, I feel that's

02:01.550 --> 02:03.560
a better time to introduce it.

02:03.560 --> 02:11.750
And I also wanted to demonstrate not using Automapper because the internet is divided on this.

02:11.750 --> 02:16.610
So coming up next, then we're going to take a look at our user interface next.

02:16.610 --> 02:22.280
And we're going to implement features that allow the user to control how they see the data they get

02:22.280 --> 02:23.330
back in our catalog.

02:23.330 --> 02:28.310
And take a look at pagination, sorting filtering and searching.

02:28.310 --> 02:30.020
And that's coming up next.
