I have a project using Simple Repository which was working before I rebuilt my dev machine. This may just be coincidence but I am now using SQL Server 2008 Express to develop against rather than 2005 and now when I run my project I get the exception "Invalid object name 'TableName'". the table exists as records are inserted fine but when it comes to update a record that is when the exception is thrown.
In case it helps this is an example of the code where the error is thrown:
/// <summary>
/// Updates the specified entity.
/// </summary>
/// <param name="entity">The entity.</param>
public void Update(IList<Result> entity)
{
using (TransactionScope ts = new TransactionScope())
{
using (SharedDbConnectionScope scs = new SharedDbConnectionScope())
{
foreach (Result result in entity)
{
Update(result);
}
ts.Complete();
}
}
}
public void Update(Result entity)
{
repo.Update(entity);
}