EntityViewContainer not being used RRS feed

  • Question

  • I have generated a class derived from EntityViewContainer using the T4 template from here:

    ( I have also tried generating it using EdmGen with the same result. )


    I have put a breakpoint on the GetViewAt() method and it is not hit. Also the time taken by the first query has not changed. This leads me to suspect that EF is not using my compiled view.

    Any ideas why this might happen?


    EF 4.0

    ASP.NET 4.0

    Model.edmx is in a DAL assembly, which also includes the Generated View class

    Self-tracking objects are in a different STO assembly





    Saturday, November 26, 2011 5:25 PM


  • Fixed it!


    The Generated View derived from EntityViewContainer must be in the assembly that contains the STOs Self-Tracking Objects.



    Sunday, November 27, 2011 11:33 AM

All replies