Finally checked out L2E framework and ran into problems almost instantly.<br /> Yeah, i know... i should read some books before.
entity with props -> id and name.<br /> entity is mapped to table, which has id and name columns.<br /> sproc, which returns ONLY id column.
ObjectResult<MyProp> result = _container.MyStoredProcedure(uberParameter);
Calling this will cause an error
[guilty method goes here] threw exception: System.Data.EntityCommandExecutionException: The data reader is incompatible with the specified 'DataBase.MyPropTableObject'. A member of the type, 'name', does not have a corresponding column in the data reader with the same name..
Can`t "just return" that field, cause that column has XML data type, but sproc uses fancy select statements, which causes:
Msg 421, Level 16, State 1, Line 1 The xml data type cannot be selected as DISTINCT because it is not comparable.
<strong>Question:</strong><br /> Is it possible to exclusively turn off mapping for this entity prop only for this one sproc?Answer1:
Problem 1 is due to the proc not having the columns to populate the entity. You don't really need the proc if you have mapped the table, just select the field you want from it using linq
var result = MyEntities.EntityIMapped.First(r => r.id = uberParameter).Name;
Would give you the value from the Name column of the table for the given id. You don't need to use a stored proc for this.
Problem 2 sounds like it is in the proc, I would think that distinct on an xml data column would give a lot of results, but I'm only guessing as I don't know your solution.
This is not a direct answer for your question but, hopefully it will point you in the right direction.