ADO.NET
with entity framework and mysql , I have a procedure
, which returns a listing.
CREATE PROCEDURE SP_CATEGORIAS()
BEGIN
select *
from (select a.id,
@rownum:=@rownum+1 as rownum,
case when ifnull(a.categoria_id,0) = 0
then a.id
else a.categoria_id
end as grupo,
ifnull((select b.categoria_id
from categoria b, (select @rownum:=0) r
where b.id = a.categoria_id
and @rownum = 1), 0) || a.categoria_id || a.id as ordem,
a.nome
from categoria a) as x
order by grupo, rownum;
END
How do I call this procedure in my asp.net code?