This project is read-only.
1
Vote

bug in entity framework query handler when Entity Set name does not match Entity name

description

InterLinq EntityFrameworkQueryHandler does not work when the entity set name does not match the entity name (e.g. entity = Customer, entity set = Customers).
 
When executing a query against such an entity, the server throws an exception:
 
'Customer' could not be resolved in the current scope or context. Make sure that all referenced variables are in scope,
that required schemas are loaded, and that namespaces are referenced correctly. Near escaped identifier, line 1, column 1.

comments

jhaegebaert wrote Sep 21, 2010 at 10:50 AM

patch: (also uploaded in patches, id 6858)


--- C:/Users/jha/AppData/Local/Temp/TFSTemp/EntityFrameworkQueryHandler;C11789.cs Tue Sep 21 11:39:06 2010
+++ C:/Users/jha/Projects/HamburgMannheimer2/InterLinq/Robin/InterLinq.EntityFramework/EntityFramework/EntityFrameworkQueryHandler.cs Tue Sep 21 11:35:52 2010
@@ -78,7 +78,7 @@
     /// <returns>Returns an <see cref="IQueryable{T}"/>.</returns>
     public IQueryable<T> Get<T>() where T : class
     {
  • return objectContext.CreateQuery<T>(string.Format("[{0}]", typeof(T).Name));
  • return objectContext.CreateObjectSet<T>();
     }
    
     /// <summary>

wrote Feb 14, 2013 at 3:02 AM