entity framework - MySql MVC3 EF Code First with Stored Procedure -
i have stored procedure created in mysql return resultset
create procedure getcount() begin select count(*) mytable; end$$
i trying call mvc3 application using ef cf as:
int count = mycontext.database.sqlquery<int>("getcount").first();
it falling on call test in application error ; have error in sql syntax; check manual corresponds mysql server version right syntax use near 'getcount' @ line 1
is not supported using mysql? above works fine ms sql server 2008. wondering if problem mysql side.
thanks
try
int count = mycontext.database.sqlquery<int>("call getcount()").first();
Comments
Post a Comment