locked
.NET MVC 3 WITH ENTITY FRAMEWORK 5 ISSUE RRS feed

  • Question

  • Hi,

    Currently I am trying to integrate a .NET MVC 3 project with a separate Entity Framework 5 project. The "DisplayName" works fine but the other annotations such as "AllowHtml" and "DisplayFormat" don't work.

    In the EF5, I used buddy class with Metadata to do the validation. At first, I was thinking maybe there are something wrong in my EF project. So I created another new MVC4 project to consume the EF. But by using MVC4, everything works fine. Based on that, I created another new MVC3 project to double check, and it still doesn't work.

    Does anyone know what's happening? And can you please let me know how I can fix this.

    Thanks in advance.

    Gary

    Tuesday, October 29, 2013 11:38 PM

Answers

  • Hi,

    I made a sample that with Entity Framework 5 and MVC3, however it worked fine.

    It is appreciated that you can share codes that how you use annotations.

    My workaround:

    VS2012, .Net Framework 4.5,Entity Framework 5 and MVC3, Win8

    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 Fred Bao Wednesday, November 6, 2013 7:49 AM
    Thursday, October 31, 2013 9:07 AM

All replies

  • Hi Gary,

    I think this thread is specific to Data forum. This form is to discuss problems about CLR development. So I am helping you to move this thread directly into that forum. Thank you for your understanding.

    Best 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.

    Thursday, October 31, 2013 3:19 AM
  • Hi,

    I made a sample that with Entity Framework 5 and MVC3, however it worked fine.

    It is appreciated that you can share codes that how you use annotations.

    My workaround:

    VS2012, .Net Framework 4.5,Entity Framework 5 and MVC3, Win8

    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 Fred Bao Wednesday, November 6, 2013 7:49 AM
    Thursday, October 31, 2013 9:07 AM