After @Gats answer - you cannot map all classes to EF. EF understands only base types, and each class mapped must either be recognized as an entity or a complex type. Thus, your Impage should be defined as:
public byte[] Image { get; set; }
Marking it as byte[] , EF will understand that it should be stored as varbinary on the SQL server. EF does not support custom types or custom initializers, so you cannot tell EF that your Image must be something else.
If you want to open Image as System.Drawing.Image, you can also do something like:
public System.Drawing.Image GetBitmap() { using (var stream = new MemoryStream(Image)) { return System.Drawing.Image.FromStream(stream); } }
source share