The entities definitions that we've used to work with EF Core are designed to give the best results when working with the database; however, they are not designed to be transferable over the wire. There are a few reasons why you wouldn't want to use the same classes that are mapped to your database tables and when sending results from your APIs:
- Security: Your domain model classes might include various properties that you wouldn't want to expose to your clients. For example, personal information or user roles.
- Loose coupling: Over time, you might need to change the data model; many times, these changes shouldn't be reflected in changes to your API, but sharing the same data types will force you to.
- Controllable ...