entity framework - I can't see stored procedures in DbContext with POCO classes -


why can't see stored procedure added in dbcontext? dbcontext generated template introduced ctp5 release (with poco classes).

i added stored procedures said tutorial: http://thedatafarm.com/blog/data-access/checking-out-one-of-the-new-stored-procedure-features-in-ef4/

moreover searched if entry added in context , these 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 is:

why won't ef4 generate method support function import?

but i've done suggests.

this stored procedure:

alter procedure getclientsforemailsend begin -- set nocount on added prevent result sets -- interfering select statements. set nocount off;  -- insert statements procedure here select * dbo.client c inner join subscription on c.idclient = i.idclient c.email not null , c.email <> '' , i.active = 1 end go 

what i'm missing?

thanks

dbcontext doesn't provide support mapping stored procedures methods. must call procedure directly using context.database.sqlcommand(...) or context.database.sqlquery(...)


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -