|
Hi,
This is a general question not specifically pertaining to DevForce EF, but more to MS ADO.NET EF.
WRT MSDN forum: http://social.msdn.microsoft.com/forums/en-US/adodotnetentityframework/thread/5898271b-538c-467b-98a3-a4c574123a41/ - http://social.msdn.microsoft.com/forums/en-US/adodotnetentityframework/thread/5898271b-538c-467b-98a3-a4c574123a41/
I have a stored procedure that joins several tables and returns a result set, hypothetical example:
ALTER PROCEDURE [dbo].[GetBlaBlaBlaHistory] @EmployeeId uniqueidentifier AS
SET NOCOUNT ON; SELECT ae.InternalId, e.FirstName, e.LastName, tv.Title, tv.Version, a.StartDateTime, a.EndDateTime, bct.Name 'AppointmentStatus' FROM RelatedEmployee ae INNER JOIN TableE e ON ae.EmployeeId = e.InternalId INNER JOIN TableA a ON ae.AppointmentId = a.InternalId INNER JOIN TableBCT bct ON ae.AppointmentStatus = bct.InternalId INNER JOIN TableATV atv ON atv.AppointmentId = a.InternalId INNER JOIN TableTV tv ON tv.InternalId = atv.TrainingVersionId WHERE ae.EmployeeId = @EmployeeId AND ae.Status = 0 AND e.Status = 0 AND a.Status = 0 AND bct.Name != 'Scheduled' ORDER BY a.EndDateTime DESC;
Using just the steps from DevForce EF Developers Guide on Store Procedure Queries, page 215, I am not able to build and run, unless the resulting entityset maps to "something with metadata", as in either table or view.
At this point, I cannot use stored procedure queries, I can only use sql view.
Has anyone has similar stored proc issues like this?
Thanks!
Sebastian
|