Brass9.Data.Entity.EFMetaHelper.GetKey C# (CSharp) Method

GetKey() public static method

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
return object
		public static object GetKey(object o, DbContext db)
		{
			var keys = GetKeysForModel(o, db);
			return keys.First().GetValue(o);
		}
	}