gpt4 book ai didi

database - 将接口(interface)而不是类映射到数据库表

转载 作者:搜寻专家 更新时间:2023-10-30 20:21:41 25 4
gpt4 key购买 nike

这可能吗?怎么办?

据您所知,要将类映射到数据库表,我们应该使用 TableAttribute(Name="tableName") 属性,因此我们不能在接口(interface)上使用属性。如果我不使用这个属性:

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

已显示。

最佳答案

这是不可能的。

引用TableAttribute Class在 MSDN 上。

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

关于database - 将接口(interface)而不是类映射到数据库表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3663104/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com