Search code examples
c#wpfentity-frameworkentitycaliburn

Entity framework custom inheritance with caliburn.micro


I am writing a WPF app using caliburn.micro to work with a database. I am using entity framework with the database-first approach (since I already have a db) to generate classes. Is it possible to make the entity framework gererate classes that would inherit the PropertyChangedBase class of caliburn Or to make them implement the IHandle interface. I need these classes to have it for the views to know when the data has been changed.


Solution

  • You could edit the copy of the .tt template inside your project:

    Modifying Entity Framework Types T4 Template

    The auto-generated entity classes are created using this template.