I have a Table with these columns
Id as integer
Name as string
Image as byte()
then I made two POCO
Public Class TableBase
Id as Integer
Name as String
End Class
Public Class Table
Inherts TableBase
Image as byte()
End Class.
Because I not always I need to load the image. The problem is that I received a discrimination error, and the solutions of TPH stuff don’t resolve it. Because I can’t add a discrimination column to database table.
...
modelBuilder.Entity<Table>()
.Map(mc => mc.Requires("TableType").HasValue("Base"))
...
Actually I don’t have a hierarchy problem; I just need to load POCO partially
Regards!