locked
PreprocessQuery help RRS feed

  • Question

  • partial void LocaisFiltro_PreprocessQuery(int? IdServico, ref IQueryable<Local> query)
            {
                query = (from Local loc in Locals
                         join LocalService sel2 in LocalServices
                         on loc equals sel2.Local
                         where sel2.Service.Id == IdServico
                         select loc).AsQueryable();
               
               }
    

    Hi all,

    I'm trying to use the PreprocessQuery process without success.

    with a breakpoint I can check that the query has the correct records, but the screen does not.

    In the screen I add one Add data item... with the Query LocaisFiltro.

    Any idea?

    Thanks

    Thursday, May 31, 2012 5:07 PM

Answers

  • Hi,

    I was confused about your situation.

    If you set a breakpoint in the PreprocessQuery, you cannot see the records because the PreprocessQuery method will be combined when querying.

    Could you share more information with me ?

    For your situation,I suggest you to create a wcf ria service for your lightswitch project.

    • Marked as answer by Otomii Lu Thursday, June 14, 2012 1:38 AM
    Tuesday, June 5, 2012 5:53 AM

All replies

  • I think you need something like this:

    LocaisFiltro = query.All

    You need to set the Data Item equal to the LINQ result.

    Thursday, May 31, 2012 8:44 PM
  • Hi,

    I was confused about your situation.

    If you set a breakpoint in the PreprocessQuery, you cannot see the records because the PreprocessQuery method will be combined when querying.

    Could you share more information with me ?

    For your situation,I suggest you to create a wcf ria service for your lightswitch project.

    • Marked as answer by Otomii Lu Thursday, June 14, 2012 1:38 AM
    Tuesday, June 5, 2012 5:53 AM