December 2019
Intermediate to advanced
510 pages
11h 33m
English
The preceding process can also be applied to the Artist and Genre entities. The following code shows the definitions of the two entities in the Catalog.Domain.Entities namespace:
using System.Collections.Generic;namespace Catalog.Domain.Entities{ //Artist.cs public class Artist { public Guid ArtistId { get; set; } public string ArtistName { get; set; } public ICollection<Item> Items { get; set; } } //Genre.cs public class Genre { public Guid GenreId { get; set; } public string GenreDescription { get; set; } public ICollection<Item> Items { get; set; } }}
Consequently, we can add two files to the Catalog.Infrastructure project as follows:
//SchemaDefinitions/ArtistEntitySchemaConfiguration.cs ...