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

  • Home
  • SEARCH
  • 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 8661361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:28:46+00:00 2026-06-12T16:28:46+00:00

First I am really new to .NET framework and all stuff around. What I

  • 0

First I am really new to .NET framework and all stuff around. What I want to do is to build my admin part for my n-tiers MVC4 App where security is dealt with SimpleMembership. (the default)

Regarding the standard MVC4 template and in order to create my GetAllUsers method, I have decided to create my membership entities (UserProfile, Membership, OAuthMembership and Roles) in my domain project with EF reverse engineer code first tool and generating my context and my repositories with T4 template for my DAL project.

I am surprised that the Membership Table is not linked with the UserProfile (as you can see in the schema) and I would be really pleased to know why (? first question)

membership_schema

In a console “test” app, (the final goal is to create a gridview where I can have Membership Table and UserProfile Table Infos linked together) there is the method I create in order to get shared Membership and UserProfile info for my users (my service project is not set yet).

Is this the correct way to do it? (second question)

    private static void GetAllUsers()
    {
        using (var MembershipRepository = new MembershipRepository())
        {
            var i = 1;
            foreach (var member in MembershipRepository.All)
            {
                Console.Write("{0}: {1} ", i, member.UserId);
                using (var UserProfileRepository = new UserProfileRepository())
                {
                    Console.WriteLine("{0}", UserProfileRepository.Find(member.UserId).UserName);
                }
                i += 1;
            }
        }
        WaitConsole();
    }

(note: I didn’t use UnitOfWork and IoC yet but I plan to do it)

Thanks a lot to know if I am on the right track.

  • 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-06-12T16:28:47+00:00Added an answer on June 12, 2026 at 4:28 pm

    I really suggest that you don’t use the default membership schema. It’s poorly designed and you don’t need most of the data in there. Rather make your own DB and define your own Membership and Role providers as it seems fit to you.

    Have a look at my previous answer: https://stackoverflow.com/a/10067020/1241400

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

Sidebar

Related Questions

First of all, I'm really new to the MVC Asp.Net ideology. I would like
First, I'm really new to Asp.Net Ajax I got an user control that have
First of all, I'm completely new to asp.net, jquery and all the web side
at first i'm really new to ORM, nhibernate and FHN. i look into this
first of all I'm really not really friendly with ruby or with rails, so
first of all, I'm really thankful for all your help. I need just one
This is really a three-part question, but I've answered the first question myself: I'm
I am pretty new to Visual Studio and .net framework and I need some
I’m new to asp.net and the mvc framework and I’m trying to learn by
I'm using Entity Framework 4 Code First in my .net MVC 2.0 project and

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.