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 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

What is the early development history of the .Net framework? (Before the release of
My project is in early development. I frequently delete the database and run manage.py
I have created WCF Data service and I hosted in visual studio ASP.net development
Totally new to Spring & Java development but working on a project for a
I'm using Agile Web Development with Rails to learn about Rails. In an early
In early phases of software development projects the conceptual data model is designed. In
In the early days of the iPhone development apps are often kicked out of
I am in early beginning of learning and deploying Win App using C#, Now
I'm working on early designs for an application that needs to start out small
I read that early C++ compilers actually translated the C++ code to C 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.