My entity classes need to also comprise logic.
What will entity framework code-first mapper do, when an entity with a method is encountered?
Will it just ignore and map only properties to a database?
Side question:
Is it a good practice to have a logic in an entity classes at all?
Methods in your entities will be ignored when EF performs the model discovery. You can even add extra properties and mark them as not mapped.
Here
Bar,ValidationResult,ValidationContextwill not be part of the model andBazproperty will not be mapped to a column.Its perfectly OK to have logic in your entity classes.