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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:24:38+00:00 2026-05-23T22:24:38+00:00

I am using: Asp.net MVC3 Ninject Repository pattern with Entity Framework 4.0 On an

  • 0

I am using:

  • Asp.net MVC3
  • Ninject
  • Repository pattern with Entity Framework 4.0

On an admin page there is a select where the user can choose a product group.
The dropdown is in a partial view in EditorTemplates. The partial view today handles the data access itself. My question is, what is the best practice for this partial view?

Is it:

  1. Keep it as it is
  2. Move the select to a view that is rendered by an Action, so that the Controller can get its dependencies from Ninject
  3. The Partial View gets both the ID of the product group selected AND all the groups from the view that invokes it.
  4. ?

Above i described a specific scenario, but I guess that it is a common problem, and I haven’t found a good way of doing it on SO.

  • 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-23T22:24:38+00:00Added an answer on May 23, 2026 at 10:24 pm

    As long as the partial view is called once, I’d go with option 2. I’d look into MiniProfiler to see all the calls to the database. You shouldn’t be doing much of that if any in your views. If it’s being called for each item in the select or if you have the data already, it would be faster to pass that data directly to the view.

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

Sidebar

Related Questions

I am using Ninject, NHibernate, ASP.NET MVC3 and repository pattern. The module binding in
I am using the ASP.NET MVC SiteMapProvider 3.0 in my MVC3 page (.NET Framework
I've got a simple web application using ASP.NET MVC3 and Ninject.Web.MVC (the MVC3 version).
Using ASP.NET MVC3, the url http://localhost:22713/tests#123456 with the following code: Your user agent: @Request.UserAgent<br
Using ASP.NET MVC there are situations (such as form submission) that may require a
Using ASP.net 2.0, how do I present the information to the user similar to
I have been using ASP.NET for years, but I can never remember when using
Is there any documentation on how to use the Razor view engine using ASP.NET
using asp.net and c# membership provider how to check if the user is registered
Using ASP.NET WebServices, by default you can't pass any IDictionary objects, because xml serialization

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.