This question is locked. New answers and comments are not allowed.
I am unclear what is the best way to deal with this pretty common scenario using Telerik OpenAccess ORM:
I have a simple webform (ASP.NET 3.5) used for editing records of data. On postback, the changed records need to be written back to the database.
Where I am unclear is how do I accomplish the data update with concurrency check. When I do not use OpenAccess ORM but ASP.NET's LinqToSQL functionality, I use a DataConext to fetch the data from the database and fill the webform controls, and on postback, I read the same DataContext from the database, and I use the Attach() method to attach the changed objects from the webform to the DataContext. I can tell ASP.NET which fields to use to check for concurrency check (i.e. a last-changed-date field, or a combination of fields). The DataContext then knows whether an object is dirty, and it also knows which data needs to be written back to the database.
I am entirely unclear about how to do this basic task with OpenAccess ORM, specifically the part where I attach a postback object to the ObjectScope. The only solution I have seen so far from the documentation is using an ObjectContainer, but this would mean that I need to store the entire ObjectContainer either in the webform or in SessionState on the server betwee postbacks.I can't imagine that this is the easiest way to proceed in ths basic scenario.
I wouldd very much appreciate any input on this.
I have a simple webform (ASP.NET 3.5) used for editing records of data. On postback, the changed records need to be written back to the database.
Where I am unclear is how do I accomplish the data update with concurrency check. When I do not use OpenAccess ORM but ASP.NET's LinqToSQL functionality, I use a DataConext to fetch the data from the database and fill the webform controls, and on postback, I read the same DataContext from the database, and I use the Attach() method to attach the changed objects from the webform to the DataContext. I can tell ASP.NET which fields to use to check for concurrency check (i.e. a last-changed-date field, or a combination of fields). The DataContext then knows whether an object is dirty, and it also knows which data needs to be written back to the database.
I am entirely unclear about how to do this basic task with OpenAccess ORM, specifically the part where I attach a postback object to the ObjectScope. The only solution I have seen so far from the documentation is using an ObjectContainer, but this would mean that I need to store the entire ObjectContainer either in the webform or in SessionState on the server betwee postbacks.I can't imagine that this is the easiest way to proceed in ths basic scenario.
I wouldd very much appreciate any input on this.