Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 652427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:16:16+00:00 2026-05-13T22:16:16+00:00

I have been reading up on porting ASP.NET Membership Provider into .NET 3.5 using

  • 0

I have been reading up on porting ASP.NET Membership Provider into .NET 3.5 using LINQ & Entities. However, the DB model that every single sample shows is the newer model while I’ve inherited a rather old model. Differences:

  • The User Table is split into a pair of User & Membership Tables.
  • All of the tables in the DB are prepended with aspnet_
  • I have Lowered versions of some columns (UserName, Email, etc)

To work with this I have copied the properties from the Membership table into the User table (in the DB this is a 1<->1 relationship, not a 1<->0,1), renamed aspnet_Applications to Application, aspnet_Profiles to Profile, aspnet_Users to User and aspnet_Roles to Role. (See image)

Image http://content.screencast.com/users/Keith.Barrows/folders/Jing/media/c3cabe76-272d-4a33-b924-8d2c50e45e9c/EFMembership.png
Link to full size image of model

Now, I am running into one of 2 problems when I try to compile.

  1. Using the model in the image I get this error: Problem in Mapping Fragment starting at line 464: EntitySets ‘UserSet’ and ‘aspnet_Membership’ are both mapped to table ‘aspnet_Membership’. Their Primary Keys may collide.
  2. If I delete the aspnet_Membership table from my model (to handle the above error) I then get: Problem in Mapping Fragment starting at line 384: Column aspnet_Membership.ApplicationId in table aspnet_Membership must be mapped: It has no default value and is not nullable.

My ability to hand edit the backing stores is not the best and I don’t want to just hack something in that may break other things. I am looking for suggestions, best practices, etc to handle this.

Note: Moving the data tables themselves is not an option as I cannot replace all the logic in the existing apps. I am building this EF Provider for a new App. Over the next 6 months the old app(s) will migrate bit-by-bit to the new structures.

Note: I added a link just under the image to the full size image for better viewing.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T22:16:16+00:00Added an answer on May 13, 2026 at 10:16 pm

    Keith

    Thnis is off the top of my head…

    I can’t really see your screenshot very well. But I think your first attempt was to have duplicate properties in two entities that point back to the same table. Not legal.

    Seems that your 2nd attempt was to do entity splitting. But it loks like you deleted the table definition from the store schema.

    I would recommend that you bring that back and do entity splitting (one entity with props from two tables which is doable if table 1 and table 2 share an entity key).

    Do you need a pointer to a walkthorugh for that? I’d have to google to find one. I’m sure I”ve got a blog post somewhere.

    julie

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been reading about bcrypt (application perspective). Thinking of using it to store
I have been reading through lots of Q&A everywhere and these stackoverflow posts seem
I have been writing an implementation for reading a .csv data file into C#
I have been reading up on the .Net RIA Services that Microsoft is developing
I have been reading about using nHibernate and multiple datasources and I get the
I have been reading about Reliability Features in .NET and have written the following
I have been reading through the C++ FAQ and was curious about the friend
I have been reading the MSDN documentation on subclassing and I have been successful
I have been reading about the differences between Table Variables and Temp Tables and
I have been reading the proper article in MSDN, Strong-Named Assemblies and a related

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.