-
Notifications
You must be signed in to change notification settings - Fork 475
Closed
Description
Hello,
Is there any way to create mapping with an ExpressionMethodAttribute and call a method that is not defined in the class itself? Say that I couod call a global defined method in multiple classes for mapping.
In my case I would like to map a property to a column if it exists, if my database version is older and the column does not exists in this version, I would overwrite thr mapping for this property to an ExpressionMethod that receives the default value.
// column exists
[Column("Test")]
Public string TestProperty{ get; set}
// column does not exist
[ExpressionMethod("DefaultStringValueMethod"), IsColumn= true]
Public string TestProperty {get; set;}
Metadata
Metadata
Assignees
Labels
No labels