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

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -