I'm using the following code to insert a new entry in my existing db. But the new record doesn't get inserted. What are the options to fetch a possible exception? What could be the reason that this doesn't work?
Thanks,
rAyt
using (ContactManagerSampleDataDataContext db = new ContactManagerSampleDataDataContext())
{
CustomerCompany company = new CustomerCompany();
company.CompanyName = "Test";
company.IsActive = true;
company.ModifiedDate = DateTime.UtcNow;
company.SapNumber = 1;
company.CompanyId = 1;
db.CustomerCompanies.InsertOnSubmit(company);
db.SubmitChanges();
}