Why interfaces are the better default
| Interface | Class | |
|---|---|---|
| Multiple inheritance | yes, many interfaces per type | no, one base class |
| Instantiation | db.Create<T>() returns a proxy |
new T() or db.Create<T>() |
| Change tracking | the proxy tracks property writes | you manage state yourself |
| Default values | handled by the proxy | you initialise every reference type |
| Parameterless constructor | not needed | required, or the model builder throws |
| Querying | the same | the same |
An interface model is shorter, has no initialisation to forget and, most important, composes.