Database context and Return Dynamic Result Set in ASP.NET MVC

前端 未结 8 1693
说谎
说谎 2020-12-14 13:42

In MVC 4 and EF 5 i want to run dynamic query.

var returndata = Context.Database.SqlQuery(Type, strsql, null);

i don\'t know, how many fie

8条回答
  •  [愿得一人]
    2020-12-14 13:49

    Without knowing anything about the type that is returned, I think you might be out of luck.

    If you know what patterns it might fall under, you could use some try { } catch () { }'s on interfaces that match those parameters on your otherwise dynamic query, but that seems like it might be a bit painful.

提交回复
热议问题