What's the correct way to use ObjectResult with input parameters to StoredProcedure in Entity Framework? (Output mapped to Complex Type Property)

社会主义新天地 提交于 2019-12-02 04:32:14

You can access it as a function call, and the order of the parameters is determined by EF:

using (var db = new YourEntityContext())
{
    var result = db.YourFunctionImportName(
        Convert.ToInt32(ddlWhatever1.SelectedValue),
        Convert.ToInt32(ddlWhatever2.SelectedValue));

    //Int32 used as an example, use whatever type your function import is expecting.
    //Do whatever with result.
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!