开发者

Mapping interface instead of class to Database Table

开发者 https://www.devze.com 2023-01-15 09:16 出处:网络
Is this possible? how? As far as you know to mapping a class to db table we should be use TableAttribute(Name=\"tableName\") attribute开发者_开发技巧, so we can\'t use attributes on interfaces. If I

Is this possible? how?

As far as you know to mapping a class to db table we should be use TableAttribute(Name="tableName") attribute开发者_开发技巧, so we can't use attributes on interfaces. If I don't use this attribute:

"The type 'interfaceName' is not mapped as a Table."

showed.


This is not possible.

Refer to TableAttribute Class on MSDN.

TableAttribute - Designates a class as an entity class that is associated with a database table.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号