I've just started out using ASP.NET MVC and TDD. I've read that while unit testing you should focus on testing your code, not other systems, like the DB. However, what happens when essential functionality is residing in the DB?
I've used the MVC Storefront series as an initial guide in how to set up my projects and patterns. As full text search is essential I've set this up as a function in my repository
IQueryable<HealthOrganization> SearchOrganizations(string phrase);
Now, the logic of this search needs a table valued function with full text and some other functions in the database. The logic in these functions is impossible to get exactly correct in the fakerepository. What is your recommendation on the best strategy to unit test this and to do TDD on the search?