C# 클래스 Brass9.Data.Entity.EFMetaHelper

파일 보기 프로젝트 열기: b9chris/Brass9.Data

공개 메소드들

메소드 설명
GetKey ( object o, DbContext db ) : object

Ambitiously assumes the passed in object is an Entity, and there's exactly one key on the model. Returns the value of that key.

GetKeysForModel ( object o, DbContext db ) : IEnumerable

Gets the Keys for a given Entity model, as PropertyInfo objects

GetKeysForModelType ( Type type, DbContext db ) : IEnumerable

Gets the keys for a given Entity model Type, as PropertyInfo objects Extracted from EF GraphDiff, RefactorThis.GraphDiff.Internal.Extensions.GetPrimaryKeyFieldsFor

ObjectContextForDb ( DbContext db ) : ObjectContext

Gets the hidden ObjectContext that backs this DbContext. http://social.msdn.microsoft.com/Forums/en-US/0c1f8425-55f4-4600-9605-a925220d5a25/objectcontext-from-dbcontext?forum=adonetefx

메소드 상세

GetKey() 공개 정적인 메소드

Ambitiously assumes the passed in object is an Entity, and there's exactly one key on the model. Returns the value of that key.
public static GetKey ( object o, DbContext db ) : object
o object
db DbContext
리턴 object

GetKeysForModel() 공개 정적인 메소드

Gets the Keys for a given Entity model, as PropertyInfo objects
public static GetKeysForModel ( object o, DbContext db ) : IEnumerable
o object
db DbContext
리턴 IEnumerable

GetKeysForModelType() 공개 정적인 메소드

Gets the keys for a given Entity model Type, as PropertyInfo objects Extracted from EF GraphDiff, RefactorThis.GraphDiff.Internal.Extensions.GetPrimaryKeyFieldsFor
public static GetKeysForModelType ( Type type, DbContext db ) : IEnumerable
type Type
db DbContext
리턴 IEnumerable

ObjectContextForDb() 공개 정적인 메소드

Gets the hidden ObjectContext that backs this DbContext. http://social.msdn.microsoft.com/Forums/en-US/0c1f8425-55f4-4600-9605-a925220d5a25/objectcontext-from-dbcontext?forum=adonetefx
public static ObjectContextForDb ( DbContext db ) : ObjectContext
db DbContext
리턴 ObjectContext