You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using (var context = new DataContext("SiteSQLServer",Transaction.Begin))
{
var job = new DataObject<omv_JobSeekerReferences>();
int cntr = 1;
foreach (var item in ViewState)
{
omv_JobSeekerReferences r = (omv_JobSeekerReferences) ViewState["item_" + cntr];
var newRefRow = new omv_JobSeekerReferences { UserId = r.UserId,Company = r.Company, FromDate = r.FromDate, ToDate = r.ToDate };
job.Insert(newRefRow); // add the new row to the table
cntr++;
}
}
It blows on job.Insert complaining that it can't find the connection string "Default".
Am I doing something wrong? It works fine if I add a default connection string and the row is inserted.
The text was updated successfully, but these errors were encountered:
I have the following code:
It blows on job.Insert complaining that it can't find the connection string "Default".
Am I doing something wrong? It works fine if I add a default connection string and the row is inserted.
The text was updated successfully, but these errors were encountered: