The difference between a business object and a data transfer object

A business object (BO) can be thought of as an Entity in Domain Driven Design

Usually it has its own DBSet inside the DbContext

The BO is not necessarily persistent.

A non persistent BO can be declared just like a persistent entity so how does EF “know” that there is no database?

Well if we are not saving it then it doesn’t actually matter. However for readability and to avoid an EF error if we try to save it, then it is good to use the following in the DbContext.OnModelCreating


A data transfer object (DTO) on the other hand is much more light weight.
It has no DBSet in the DBContext