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 321493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:51:03+00:00 2026-05-12T08:51:03+00:00

I have asp.net membership and I use the built in Create user method since

  • 0

I have asp.net membership and I use the built in Create user method since it is convenient now after this depending on the user I want to add 2 more fields to the aspnet_UserTable.

In my aspnet_user Table I have like this

// All Standard Fields that come with this table
ClubID<nullable)
ClubName <nullable)

I have a table that relates this

Club Table

ClubID<PK>
ClubName

So this relationship forms that one club can have many users. But one user can only have 1 club.

So now I been trying to figure out how to add the ClubID to the aspnet Usertable since it does not show up in the Entity Framework Diagram since it does not show FK.

// Note in this case I am just using EF made to create but in reality I will use the Membership.Create. 
aspnet_Users test = aspnet_Users.Createaspnet_Users(Guid.NewGuid(), Guid.NewGuid(), "myTest5", "mytest5", false, DateTime.Now);

            test.Club = Club.CreateClub("One224", "Two224");
            test.ClubName = "go";

            MyEntities.AddToaspnet_Users(test);

            MyrEntities.SaveChanges();

So what I have works but it just makes no sense and I hope there is a better way. Like I try to create the club and then stick it in the test.club.

This add’s the ClubID primary key but does not add the clubName.

So then I have to add the club name separately. Like why? Is there not a better way?

I also prefer linq method syntax so if it is needed and you know this syntax can you please write it in that.

  • 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-12T08:51:03+00:00Added an answer on May 12, 2026 at 8:51 am

    I would recommend a few things.

    One: Strongly consider not adding columns to the aspnet_* tables. If you ever want to change your authentication method down the road you’ll be stuck lugging those tables around with you even though you won’t need them anymore. Also, there may be a new, better version of the membership provider one day that you won’t be able to upgrade because you have customized the membership schema.

    Two: Instead, why not create a new table called User (or something of your liking) that has your own primary key but links back to the ASP.NET Membership unique key (the guid).

    Your table might look like

    User
    UserId (PK)
    AuthenticationUserId (FK back to aspnet_User table)
    ClubId (FK back to your club table)

    Three: I don’t understand why you’ve repeated ClubName both in your user table and in your Club table. You really only need to define the ClubName once, right? Keep your Club table how it is but remove the ClubName column from the user table.

    Your code above for associating the club with the user is correct and works because that’s how the Entity Framework works. You’re associating entities with each other and are abstracted from some of the relational aspects of your data schema. It’s a little strange to get used to it first but it does work.

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

Sidebar

Related Questions

I have been wondering on how to use ASP.NET Membership together with MVC. The
i want to use asp.net membership provider for my own database i have own
I have an asp.net web-from application which uses ASP.NET membership provider . Beside this
I have website that uses ASP.net Membership Provider. This web site will be served
We have an intranet asp.net web application which uses the OOTB ASP.net membership and
Does anyone have any examples of using Sqlite with ASP.NET membership? I am building
I have asp.net form that contains fields. When I access this window, my javascript
I have ASP.Net code similar to the following (this is inside a FIELDSET): <ol>
I don't want to have the security question and answer feature that ASP.Net Membership
I have a basic app using the ASP.NET membership provider. By default, you can

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.