Fredrik
Fredrik

Reputation: 23

Inheritance issues with SQL Server CE and Mango

I'm trying to implement SQL Server CE code in Windows Phone 7.1 (Mango). I have two classes, one base class 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?

Upvotes: 1

Views: 585

Answers (2)

with
with

Reputation: 306

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.

Upvotes: 2

ErikEJ
ErikEJ

Reputation: 41749

You can specify a base class for the class decorated with [Table], but not have two classes both with the [Table] attribute

Upvotes: 0

Related Questions