I'm trying to implement SQL Server CE code in Windows Phone 7.1 (Mango). I have two classes, one base c开发者_运维知识库lass and one inherited - both declared as [Table] with [Column]:s
Can you not have inheritance in SQL Server CE for Mango??
I don't want to change all my Entity classes to not have inheritance....
Might someone know the answer to this?
You can have inheritance in SQLCE for Mango if you follow the LINQ to SQL Inheritance Mapping pattern.
I've blogged about the [Column] inheritance issue here and here. The LINQ to SQL Inheritance Mapping docs are here.
You can specify a base class for the class decorated with [Table], but not have two classes both with the [Table] attribute
精彩评论