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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:51:36+00:00 2026-06-12T07:51:36+00:00

I began working with some many to many relationships in EF code first and

  • 0

I began working with some many to many relationships in EF code first and found that I don’t like having collections on my entities. I would much prefer the many to many relationships be handled in my repository so I can do something like repository.GetUsersForOrganization(organization). My main concern is not exposing a collection on my entities and having a few methods on my repositories handle everything concerning the many to many relationships including fetching, adding, and deleting the relationships. I’m pretty much at a loss as to the best way to go about removing the collections and replacing it with the repository based approach. How have other people accomplished this?

  • 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-12T07:51:37+00:00Added an answer on June 12, 2026 at 7:51 am

    If you don’t want to have navigation properties for many-to-many relations on your entities you will simply not map those many-to-many relations and you will instead map junction tables for many-to-many relations as separate entities and access them directly in your specialized methods in repository.

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

Sidebar

Related Questions

I am working on a project that already has begun being developed. ON some
I recently began working on a large project that contains a huge number of
Good morning all, I've got an association that I'm working on, and for some
I am working on a REST based API, and having some trouble figuring out
I am working through some C++ code from Financial Instrument Pricing Using C++ -
I've recently began on working on my first CORBA project. I think I got
Tonight I've been taking a look at some code I've been working on over
Okay, first I will begin with some background. I'm working on a project for
I just began working with ASP.NET and I'm trying to bring with me some
I'm working on an app that can display a graph with some data, one

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.