views:

62

answers:

1

This is my first project using StructureMap, it is an MVC web app and I'm using LinqToSql for my dataaccess. I'm following the repository pattern so a large amount of testing will avoid the db. However, for my CRUD operations I'm going to have the DataContext create a new db for each test.

My domain model is being held in its own assembly.

What would be the best way of ensuring the correct connection string is being used during testing and production with StructureMap?

A: 

I'd use different settings file (app.config) in Repositories.Tests assembly with test database connection string, and not use SM for this.

Pawel Lesnikowski