I have the following select query which works fine ...
DomainModel.Manager manager = new DomainModel.Manager();
var query = manager.Companies;
foreach (DomainModel.Company comp in query)
{
textBox1.Text += comp.CompanyName;
}
if (textBox1.Text.Length == 0)
{
MessageBox.Show("No Companies");
}
... but, I cannot create a new record ...
DomainModel.Manager manager = new DomainModel.Manager();
DomainModel.Company comp = manager.CreateEntity<DomainModel.Company>();
comp.CompanyName = textBox1.Text;
comp.CompanyId = 1;
List<DomainModel.Company> list = new List<DomainModel.Company>();
list.Add(comp);
SaveOptions options = new SaveOptions();
options.ThrowExceptionOnSaveFailure = ThrowExceptionRule.Always;
manager.SaveChanges(list, options);
... it runs fine (no errors), but it does not create a new record in the db. So, what am I doing wrong?