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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:34:07+00:00 2026-05-12T07:34:07+00:00

I am early in development on a new ASP.Net MVC project and I using

  • 0

I am early in development on a new ASP.Net MVC project and I using this project to get into DI. I’m pretty sure that I am going to go with Structure Map, but that isn’t what I am asking about. What I am trying to figure out is how best to organize my solution. Do both the unit test project and the model get a configuration file to map their dependencies or is there one class to rule them all?

Also, are there any newbie traps to avoid before I get too far into this?

Many Thanks, All…..

Update
I should add that when I say “organize the solution”, I’m not referring to the number of files/folders, etc., but rather how to structure the classes that are involved with DI. In particular, how to manage the bootstrapper. I can see where poor phrasing on my part could cause confusion.

  • 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-12T07:34:07+00:00Added an answer on May 12, 2026 at 7:34 am

    To encourage better TDD. Have two testing projects and or namespeaces X.Unit.Tests & X.Integrations.Tests.

    I have my DI code in my main project in a “namespace directory” (/Config) but in my integration code tests, I might just call those registries or override if I required in my base fixtures or setups.

    E.g.

    /Config/ServiceRegistry.cs
    /Config/RepositoryRegistry.cs
    /Config/Bootstrapper.cs

    In global.asax I call Bootstrapper.Init() and this will call x.AddRegistry(new ServiceRegistry()) and so on.

    In my unit tests you dont need to be using DI only in your integration tests. In my IntegrationTests e.g. if I’m testing NHibernate through to the database I might initialise SM with RepositoryRegistry in TestSetUp with a helper method just wrappering GetInstance().

    I don’t split out to projects .Bootstraper and .Domain until I have absolutely have to… Three projects, X, X.UnitTests, X.Integration if you required more move later. I came from a background/company enforce of having dozens of projects it felt dirty a first reducing but not now, I go hit the grow running quickly and reorganize solutions structure later if required.

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

Sidebar

Related Questions

I'm very early in the iPhone development learning process. I'm trying to get my
We're in an early stage of a new web project. The project will grow
I'm early in development on a web application built in VS2008. I have both
I've been given an early Christmas Present: Permission to step out of the development
Since the early days, Palm OS has had a special easter egg mode that's
In the early days of .NET, I believe there was an attribute you could
I'm in early (pre-coding) stages of developing a mobile web application using jQuery Mobile
We are in the early design stages of a major rewrite of our product.
In the early days of SharePoint 2007 beta, I've come across the ability to
In the early days of C++ when it was bolted on top of C,

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.