This question is locked. New answers and comments are not allowed.
Hi,
I have two issues with this product. And im finding it hard to see why (if they are) the observed functionality would have been implemented.
Issue 1:
Say i have a VERY basic table with the columns: CustomerID (int PK not null) and CustomerName (varchar not null)
And a very simple form consisting of a Textbox for the name, a BindingSource for the object and a button to save.
If i leave the name blank, and click save i quite rightly get the error saying that Null cannot be inserted in to the NAme field. Then, if i populate the name and click save, the code passes SaveChanges but nothing is written.
If i close and re-open the form, fill in name from the get go and click Save all is well.
So, i did a little digging and it seems that if an exception is thrown in the SaveChanges method, then the objects which were being tracked are no longer being tracked (I have to call Context.Add()) again to get them to save.
Is this normal?
I have two issues with this product. And im finding it hard to see why (if they are) the observed functionality would have been implemented.
Issue 1:
Say i have a VERY basic table with the columns: CustomerID (int PK not null) and CustomerName (varchar not null)
And a very simple form consisting of a Textbox for the name, a BindingSource for the object and a button to save.
If i leave the name blank, and click save i quite rightly get the error saying that Null cannot be inserted in to the NAme field. Then, if i populate the name and click save, the code passes SaveChanges but nothing is written.
If i close and re-open the form, fill in name from the get go and click Save all is well.
So, i did a little digging and it seems that if an exception is thrown in the SaveChanges method, then the objects which were being tracked are no longer being tracked (I have to call Context.Add()) again to get them to save.
Is this normal?