public static object GetKey(object o, DbContext db) { var keys = GetKeysForModel(o, db); return keys.First().GetValue(o); } }