Why can't I see the stored procedure added in my DbContext? DbContext is generated by the template introduced with the release of CTP5 (with POCO classes).
I added stored procedures, as stated in this lesson:
http://thedatafarm.com/blog/data-access/checking-out-one-of-the-new-stored-procedure-features-in-ef4/
Also, I searched if the entry was added in my context, and these are the results:
<Function Name="GetClientsForEmailSend" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" />
<FunctionImport Name="GetClientsForEmailSend" EntitySet="Client" ReturnType="Collection(DBMailMarketingModel.Client)" />
<FunctionImportMapping FunctionImportName="GetClientsForEmailSend" FunctionName="DBMailMarketingModel.Store.GetClientsForEmailSend">
A similar question:
Why doesn't EF4 generate a method to support my import function?
but I made all the suggestions.
This is a stored procedure:
ALTER PROCEDURE GetClientsForEmailSend
AS
BEGIN
SET NOCOUNT OFF;
SELECT *
FROM dbo.Client AS c
INNER JOIN Subscription AS i on c.IDClient = i.IDClient
WHERE c.Email is not null and c.Email <> '' and i.Active = 1
END
GO
What am I missing?
thank
source
share