views:

59

answers:

0

I've got the latest Mysql connector that allows you to use the Visual Studio Entity Framework designer. It's been working great, but I just added a stored proc.

The Server Explorer loaded it up fine with the parameters specified, but then I added it to the Entity Model & the code it generates doesn't have any input parameters.

Here's the stored procedure

CREATE PROCEDURE `GetViewableMenuNodes`(IN siteId INT, IN parentId INT, IN userName varchar(255))
BEGIN
    select m.*
    from menunode m 
    where m.siteid = siteId
    and m.showinmenu = 1
    and m.parentid = parentId
    and m.viewername = userName;
END

and this is the code generated by the model

public global::System.Data.Objects.ObjectResult<MenuNode> GetViewableMenuNodes()
{
    return base.ExecuteFunction<MenuNode>("GetViewableMenuNodes");
}