none
EF and Membership provider issues? RRS feed

  • Question

  • So, thanks to the patience of some of the folks here, I'm plowing through my first substantial project incorporating EF.  Recently I added a few tables and when I updated the model I got "Info Messages" in the build window, mostly (but not solely) related to asp membership tables such as:

    Message 1 The table/view 'blahblah.dbo.vw_aspnet_Applications' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view. 

    Message 2 The table/view 'blahblah.dbo.vw_aspnet_MembershipUsers' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.

    There are the default primary keys in the tables, I  haven't modified any of the membership tables, and I haven't (yet) encountered any problems but knowing that today's info messages are tomorrows errors... what's going on here and what's the fix?

    Thanks as always for any help... it's much appreciated!

    Tuesday, September 25, 2012 3:50 PM

Answers

  • Hi,

    So I take it that the aspnet membership tables are part of your model? Is there a reason to have them in there or is it better that you just exclude them from your EF model?


    We are seeing a lot of great Entity Framework questions (and answers) from the community on Stack Overflow. As a result, our team is going to spend more time reading and answering questions posted on Stack Overflow. We would encourage you to post questions on Stack Overflow using the entity-framework tag. We will also continue to monitor the Entity Framework forum.

    • Marked as answer by PaulBinCT Tuesday, September 25, 2012 10:23 PM
    Tuesday, September 25, 2012 9:38 PM
    Moderator

All replies

  • Hi,

    So I take it that the aspnet membership tables are part of your model? Is there a reason to have them in there or is it better that you just exclude them from your EF model?


    We are seeing a lot of great Entity Framework questions (and answers) from the community on Stack Overflow. As a result, our team is going to spend more time reading and answering questions posted on Stack Overflow. We would encourage you to post questions on Stack Overflow using the entity-framework tag. We will also continue to monitor the Entity Framework forum.

    • Marked as answer by PaulBinCT Tuesday, September 25, 2012 10:23 PM
    Tuesday, September 25, 2012 9:38 PM
    Moderator
  • Hey Glenn!

    Well, to be honest you raise a question that I hadn't considered.  I'm using membership and auth of course, and since I was an EF virgin at the time I just let it bring everything long for the ride when it built the model.  This is the first time it protested about their presence...

    Tuesday, September 25, 2012 9:45 PM