Notification from untracked entity received

Notification from untracked entity received

Postby -marcelo- » Tue 15 Aug 2017 15:48

I´m trying to use a DataContext to read data from the database in a using statement.
Then, when some changes are done to some entity, send the updates using code as follows.
I supposed that the Attach() method was the way to go. But even if I´m updating the (only in this case) property after the Attach(), I´m getting the exception in the subject. The source is Devart.Data.Linq.
What is the correct way? Or must I maintain the DataContext through the entire life of the application?
Code: Select all
                using (FormPrintingDataContext context = FormPrintingDataContext.Get( "nmwiu", "public" )) {
                    try {
                        context.FormPrintingStorages.Attach(chgdinstance, readinstance);
                        chgdinstance.Definition = definition;
                    catch (Exception e) {
                        MessageBox.Show(String.Format("{0}{1}{2}", e.Message, Environment.NewLine,
                            e.InnerException != null ? e.InnerException.Message : "No more info"));
                    finally {

Posts: 16
Joined: Wed 28 Jun 2017 12:35

Re: Notification from untracked entity received

Postby Shalex » Wed 16 Aug 2017 11:56

We cannot reproduce the problem in our environment.

1. Please modify the project (we just sent it to your email) to reproduce the error and send it back to us.

2. Specify the full stack trace of the error.
Devart Team
Posts: 7889
Joined: Thu 14 Aug 2008 12:44

Return to dotConnect for PostgreSQL