我需要在Entity Framework
中了解视图的来源(我需要显示它们)
例如:
CRMEntity crm = new CRMEntity();
crm有一个fullTable
视图
这是它的脚本:
create view [dbo].[FullTable]
as
select c.iCustomerId,c.id,sum(p.iPoints) sumPoints ,
a.nvCity,a.nvNeighberwood,a.nvStreet,a.iHouseNum,a.nvEnterance,a.iFloor,a.nvNote
from tbl_Customer c
join Point p on p.iCustomerId=c.iCustomerId
join tbl_Address a on a.iAddressId=c.iAddressId
group by p.iCustomerId,c.id,c.iCustomerId,c.nvCellolar,c.nvFirstName,c.nvLastName,c.nvPhone,
a.nvCity,a.nvNeighberwood,a.nvStreet,a.iHouseNum,a.nvEnterance,a.iFloor,a.nvNote
并查看computedColumns
视图,这是它的脚本:
create view [dbo].[computedColumns]
as
select a.iAddressId+a.iAddressId cmp1,STR(a.nvCity,0,5) cmp2,333 cmp3,a.iFloor+1 cmp5 from tbl_Address a
(所有选项均来自表格)
我想知道每个列的来源
代表computedColumns
:
cmp1->tbl_Address.iAddressId
cmp2->tbl_Address.nvCity
cmp3->null
cmp5 ->tbl_Address.iFloor
代表FullTable
:
iCustomerId->tbl_Customer.iCustomerId
id->tbl_Customer.id
sumPoints ->Point .sumPoints
and Etc