共用方式為


DbEntityEntry.GetDatabaseValues 方法

[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]

查詢資料庫,以找出目前存在於資料庫中之追蹤實體值的複本。 請注意,變更傳回的字典中的值將不會更新資料庫中的值。 如果資料庫中找不到此實體,將會傳回 null。

命名空間:  System.Data.Entity.Infrastructure
組件:  EntityFramework (在 EntityFramework.dll 中)

語法

'宣告
<SuppressMessageAttribute("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")> _
Public Function GetDatabaseValues As DbPropertyValues
'用途
Dim instance As DbEntityEntry 
Dim returnValue As DbPropertyValues 

returnValue = instance.GetDatabaseValues()
[SuppressMessageAttribute("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
public DbPropertyValues GetDatabaseValues()
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1024:UsePropertiesWhereAppropriate")]
public:
DbPropertyValues^ GetDatabaseValues()
[<SuppressMessageAttribute("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")>]
member GetDatabaseValues : unit -> DbPropertyValues
public function GetDatabaseValues() : DbPropertyValues

傳回值

類型:System.Data.Entity.Infrastructure.DbPropertyValues
存放區的值。

請參閱

參考

DbEntityEntry 類別

System.Data.Entity.Infrastructure 命名空間