C# Class Brass9.Data.Entity.EFMetaHelper

Afficher le fichier Open project: b9chris/Brass9.Data

Méthodes publiques

Méthode Description
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

Method Details

GetKey() public static méthode

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
Résultat object

GetKeysForModel() public static méthode

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

GetKeysForModelType() public static méthode

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
Résultat IEnumerable

ObjectContextForDb() public static méthode

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
Résultat ObjectContext