locked
Upgrade Problem! (SingleOrDefault_Executing => Query_Executing) RRS feed

  • Question

  • Dear Sir/Madam

    I have upgrade my lightswitch project to LS2012.
    The previous version has the code...

    partial void Products_SingleOrDefault_Executing(int? Id)
    {
    if(Id == -1) { /* do something*/ }
    }

    The LS2012 don't has SingleOrDefault_Executing event and I have used Query_Executing event instead.

    The problem is how to get the Id parameter from Query_Executing event

    partial void Query_Executing(QueryExecutingDescriptor queryDescriptor)
    {
    /* how to get Id */
    }

    Thank You.

    Tuesday, July 31, 2012 2:57 PM

All replies

  • If you had a V1 app where you were using SingleOrDefault_Executing, when you upgrade that app, we will bring that code forward and we will actually run it at the right times.

    However, even if you upgraded a V1 app with this code in it, I don't beleive the method will show up in the "Write Code" menu.  However, the code will still be in your source file.

    In a new V2 app, or if you didn't implement any code for SingleOrDefault_Executing in your V1 app before upgrading, the functionality will not be available.

    Tuesday, July 31, 2012 6:43 PM