I have a DTO, let say Vehicle and it has a manufacturer date property (DateTime Vehicle.ManufacturerDate {get; set;}
.
When a DTO has a primary key, I would write something like below:
modelBuilder.Entity<Vehicle>()
.HasKey(nameof(Vehicle.ManufacturerDate));
However, in this case, the Vehicle
DTO does not have a primary key.
Instead, it has a clustered non-unique index on Manufacturer Date.
Is clustered non-unique index same as non-clustered index?
I have searched in Google & SO. The closest post I got is: How to create a Clustered Index with Entity Framework Core
However, that post only answers clustered index on Person.UserName
How do I create clustered non-unique index on Vehicle.ManufacturerDate
?