How to map System.Version as complex type in Entity Framework 6
I have a System.Version object in one of my POCO objects using Code First Entity Framework 6. I would like to map it to a database like:
table Diagnostics
column ApplicationVersionMajor int
column ApplicationVersionMinor int
column ApplicationVersionBuild int
column ApplicationVersionRevision int
How to do it when the class looks something like this:
class Diagnostics
{
public System.Version ApplicationVersion { get; set; }
}
I know I can decorate my own value objects with the [ComplexType] attribute; I just don't know how to do this for the frame type.
+3
source to share