I am more experienced with the Database First approach for Entity Framework.  I am currently looking at a Code First project, which returns domain model objects from the repository.Database FirstPlease see the code below, which is a Database First repository method I created:public dbPerson getPersonByID(int personID)        {            return _dbContext.Set<dbPerson>()                   .Where(x => x.ID == personID);          }dbPerson is a class created by Entity Framework Database First.  The application service calls getPersonByID (contained in repository) and maps the dbPerson class returned by the repository to Person (Domain class).  The Person domain object then calls its own methods.Code FirstI am now looking at a code first implementation that appears to call the database and return a domain object i.e. the repository looks like this:public Person getPersonByID(int personID)        {            return _dbContext.Set<Person>()                   .Where(x => x.ID == personID);          }In this case; there is no need to map dbPerson to Person in the application service (as there was in my Database First example).  Question(s)1) Is this a benefit of Code First?2) Is it an anti pattern to put domain logic in a code first EF entity?3) Is it an anti pattern to put domain logic in a database first EF entity? Are these classes suppose to be treated as simple DTOs i.e. with no methods?
Return domain objects from the repository
c#;domain driven design