You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added Ef5Repository which has an EF5 rather than EF4 dependency. Code is essentially duplicated from EfRepository and there are no tests in place yet. Needed it quickly -- so I pooped it out.
// we override the implementation fro LinqBaseRepository becausee this is built in and doesn't need to find the key column and do dynamic expressions, etc.
64
+
protectedoverrideTGetQuery(TKeykey)
65
+
{
66
+
returnDbSet.Find(key);
67
+
}
68
+
69
+
// TODO: use logic like this to override GetPrimaryKey
70
+
// below is using the older EF stuff and it doesn't translate exactly
71
+
//private EntityKey GetEntityKey(object keyValue)
72
+
//{
73
+
// var entitySetName = GetEntityName();
74
+
// var keyPropertyName = _dbSet.EntitySet.ElementType.KeyMembers[0].ToString();
75
+
// return new EntityKey(entitySetName, new[] { new EntityKeyMember(keyPropertyName, keyValue) });
0 commit comments