Ok, based on that - two things.
Firstly, I suspect that you may be using NUnit test runner, so I think it will be looking in that thing's app.config for the connection string rather than you app. That'd explain why it works with Microsoft's approach.
Other thing (maybe not important):
using(DataContext db = new DataContext(ConfigurationManager.ConnectionStrings["connectionstring"].ToString())
Should be:
using(DataContext db = new DataContext(ConfigurationManager.ConnectionStrings["connectionstring"].ConnectionString)
Either way, I bet that you are calling ToString() on a null!