考虑为一体的两个表两个、为一体

由网友(- 。滥〃)分享简介:我有两个表是这样的:Table1(id, name)Table2(id_of_table_1, code)我并不需要一个实体的表1和表2,而是一个实体两者一起:I don't need an entity for Table1 or Table2, but one entity for both together...

我有两个表是这样的:

Table1(id, name)
Table2(id_of_table_1, code)

我并不需要一个实体的表1和表2,而是一个实体两者一起:

I don't need an entity for Table1 or Table2, but one entity for both together:

class Merge{
    public virtual long id{get;set;}
    public virtual string name{get;set;}
    public virtual string code{get;set;}
}

我如何可以加载表到EDMX使它们视为一个?

How can I load the tables to the edmx so that they will considered as one?

我没有对数据库的任何控制,我不能创建表或视图。

I don't have any control on the database and I can't create tables or views.

推荐答案

您正在寻找所谓的实体分裂。

阅读全文

相关推荐

最新文章