2015-05-01 69 views
0

所以我認爲我已經連接到實體框架視圖,該視圖看起來是這樣的:實體框架搞亂行標識

CREATE VIEW [dbo].[vwRetroContractAggregate] AS 
 

 
\t SELECT top 100 percent Rowid, 
 
\t RegionPeril, 
 
\t RIType, 
 
\t RIProgramme, 
 
\t RIContract, 
 
\t Level, 
 
\t TotalReinstatement, 
 
\t CcyCodeISO, 
 
\t ColumnType, 
 
\t TotalRecovery, 
 
\t MaxRecovery, 
 
\t MeanRecovery 
 
\t FROM NctWarehouseStaging.dbo.NctRetroContractAggregate<br> 
 
\t order by RegionPeril

當我運行在SQL Server中我的觀點爲每一行獲取唯一的行ID,但是當我在實體框架中運行下面的語句時,它會返回帶有各種不帶模式的隨機重複ID的結果。爲什麼會發生這種情況,因爲我從來沒有遇到過這樣的事情?

var results = db.vwRetroContractAggregates.ToList(); 

回答