This can be thought of as similar to domain-driven design. In this approach, you write the entity objects and the domain and then use the domain to generate a database using EF. Using different attributes in the entity objects, EF can understand what to do with the database and how. For example, if you want a particular property in your model to be treated as a primary key, you can use data annotations or a fluent API to indicate to the EF that it should treat this column as a primary key when creating the table in the database.