As part of our server-side payment processing, we're going to actually persist the user's orders into the database, and to do that we need to make some changes to our data model. We have a couple of new entities to create, and a few minor tweaks for our existing ones. We'll also be looking at some of the new features introduced in EF Core 2.0 such as owned entity types.
Server-side payment processing
Adding orders to the data model
The first and most obvious new entity we need is the Order entity. Create a new Data/Entities/Order.cs file with the following contents:
namespace ECommerce.Data.Entities
{
public class Order
{
public int Id { get; set; }
public int UserId { get; set; }
public DateTime...