concept entity class in category entity framework

This is an excerpt from Manning's book Entity Framework Core in Action, SE MEAP V04 epub.
Owned Type class. Useful for adding grouped data, such as an Address
class, to an entity class. TheAddress
class is linked to the main entity, but your code can copy around the Address class rather than having to copy each individual Street, City, State… properties.

This is an excerpt from Manning's book Entity Framework Core in Action.
This listing shows how to use the
LazyLoader
service to load the navigational collection propertyMany
, only if you read that property. TheILazyLoader
service is injected via a private constructor on the entity class (see B.2.2).
Listing 6.5 Excluding a property and a class by using the Fluent API
public class ExcludeDbContext : DbContext { public DbSet<MyEntityClass> MyEntities { get; set; } protected override void OnModelCreating (ModelBuilder modelBuilder) { modelBuilder.Entity<MyEntityClass>() .Ignore(b => b.LocalString); #1 modelBuilder.Ignore<ExcludeClass>(); #2 } } #1 The Ignore method is used to exclude the LocalString property in the entity class, MyEntityClass, from being added to the database. #2 A different Ignore method can exclude a class such that if you have a property in an entity class of the Ignored type, that property isn’t added to the database.
This chapter covers how EF Core finds and configures relationships between entity classes, with pointers on how to configure each type of relationship—one-to-one, one-to-many, and many-to-many—and examples of each. EF Core’s By Convention relationship rules can quickly configure many relationships, but you’ll also learn about all the Data Annotations and Fluent API configuration options, which allow you to precisely define the way you want a relationship to behave. You’ll also look at features that allow you to enhance your relationships with extra keys and alternative table-mapping approaches.
Figure 10.2 My implementation of the DDD pattern for handling business logic with EF Core. This also uses the SoC approach, with low coupling between the business logic and the database access. You can find a detailed description of the five steps in chapter 4, and in section 10.4 I extend the design to move some of the business logic inside the entity classes.
![]()