The data reader is incompatible with the specified Entity Framework

前端 未结 3 1365
旧时难觅i
旧时难觅i 2020-12-18 20:10

I have a method that will return the bare min results from a sproc to fill a select menu. When I want the bare min results I pass bool getMin = true to the sproc, and when I

3条回答
  •  爱一瞬间的悲伤
    2020-12-18 20:38

    To me it seems that both branches of the IF return different data, the first branch returns 9 columns where the second - only three. I believe the EF can't reflect the IFramingSystem from the latter. Specifically, the column FrameType (and 5 other columns) are obviously missing:

     ...
     SELECT c.ID,c.Name,c.Descr    <- where are the remaining columns
        from Catelog.Component c
     ...
    

提交回复
热议问题