concept Author in category entity framework

This is an excerpt from Manning's book Entity Framework Core in Action.
The Books table name comes from the
DbSet<Book>property name ofBooksin the application’s DbContext, which I show in figure 1.5. The Author table name doesn’t have aDbSet<T>property in the application’s DbContext, so the table defaults to the class name,Author. Section 6.10.1 covers these configuration rules in more detail.
Listing 1.1 shows the other class you’ll be using:
Author. This has the same structure as theBookclass in figure 1.4, with a primary key that follows the EF Core naming conventions of<ClassName>Id(see section 6.3.15). TheBookclass has a property calledAuthorId, which EF Core knows is a foreign key because it has the same name as theAuthorprimary key.Listing 1.1 The
Authorclass from MyFirstEfCoreApppublic class Author { public int AuthorId { get; set; } #1 public string Name { get; set; } public string WebUrl { get; set; } } #1 Holds the primary key of the Author row in the DB. Note that the foreign key in the Book class has the same name.
Figure 9.7 An external system that asks for a specific book and gets the JSON containing the book and all its relationships. When the external system wants to update the authors’ names, it sends back all the original JSON, with the changed names, but tells your application that it needs only the authors’ names changed. Your application uses EF Core’s
ChangeTracker.TrackGraphmethod to set all the classes to stateUnchanged, but sets theIsModifiedflag on theNameproperty in theAuthorentity class.![]()