Cascaded windows with cancel option - challenge for change tracking and query engine RRS feed

  • Question

  • Hi there,

    there is a typical scenario in windows apps where one form is already open, the user has modified data and then clicks on a button in that form to show up another form with more detailed data for this entry. Both forms have cancel buttons and shall cancel individual changes.

    There are two challenges in here:

    1) Canceling individual changes per Dialog while sharing data

    2) Querying the data for the second window when part of this (referencing) data has just been created by the first dialog (and not submitted to db)

    A possible solution for 1) is to have a datacontext for form1 and then when creating from2 to clone the first one (that is having a new changtracker but same identitytracker) [- currently not supported and internal fields private ;-(].

    A possible solution for 2) is to have linq be smart and use IQueryable<T> on modified and new objects first and then on SQL datastore - a real challenge i guess.

    Please let me know your thoughts on this.

    In addition let me note that we shall be able to add pessimistic locking to DLINQ by replacing the ChangeTracker. [also not possible as DataContext.Init is private :-()

    Kind Regards



    Tim Fischer, CEO tangible engineering - the model driven development company

    www.tangiblearchitect.com - Model-Driven O/R Mapping for .NET


    Monday, January 1, 2007 4:53 PM