August 2018
Intermediate to advanced
298 pages
5h 33m
English
Scenario
You want to add a supplier entity that denotes the supplier of a product.
Aim
Add a supplier entity for a product.
Steps for completion
namespace RestBuy.Entities{ class Supplier : BaseEntity { public string Name { get; set; } }}
Optionally we can add a Supplier property to Product or a SupplierId depending on if we want them to be in the same aggregate or not. This is a design choice.
void ConfigureSupplier(EntityTypeBuilder<Supplier>builder){ builder.ToTable("Suppliers"); builder.HasKey(ci => ci.Id); builder.Property(ci ...Read now
Unlock full access