locked
EF6 and MEF RRS feed

  • Question

  • Is there any examples showing how to use Entity Framework with MEF.  I am developing a WPF desktop application using SQLCE, EF, and MEF.  I am looking for an example on how a MEF class can change the DbContext (i.e. add it own DbSet) to an existing or new database file.
    Sunday, January 26, 2014 11:43 PM

Answers

  • Hello,

    >>Is there any examples showing how to use Entity Framework with MEF.

    There is an example for using Code Fist with MEF:

    http://stackoverflow.com/questions/8730830/mef-plugins-and-ef-codefirst-how

    Hope it to be helpful  to you.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by jfras2009 Saturday, February 1, 2014 5:12 PM
    Tuesday, January 28, 2014 1:01 AM

All replies

  • Hello,

    >>Is there any examples showing how to use Entity Framework with MEF.

    There is an example for using Code Fist with MEF:

    http://stackoverflow.com/questions/8730830/mef-plugins-and-ef-codefirst-how

    Hope it to be helpful  to you.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by jfras2009 Saturday, February 1, 2014 5:12 PM
    Tuesday, January 28, 2014 1:01 AM
  • Thanks for your response.  Is there a better way to do this in EF6

    Regards

    Tuesday, January 28, 2014 6:23 PM
  • Hello,

    Entity Framework 4.2 with FluentAPI (CodeFirst) should be similar Entity Framework 6, both of them use a context which inherits from DbContext object, they use different namespaces.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, January 29, 2014 9:33 AM