locked
WFC Data Service - Load Data Question RRS feed

  • Question

  • Hi,

    I am beginner with WFC Data Services and Odata.

    Is it possible to load only specific data of a table.

    For example if I have a table Costumer I only want to load the first name and not the second name, adress etc?

    I think this will be possible with query projections?

    But I think with query projections I am only able to read the data and not to edit it? So my next question is, is it possible to first load the whole costumer table with all the data and the next time just load the first name?

    Maybe it is possible to load the costumer, load the first name with query projections and update the local context?

    Or is there a much better way to do this?

    I am just thinking about how to load the data to my client the best way to save bandwith.

    Thanks.

    Markus

    Sunday, November 2, 2014 5:37 PM

All replies

  • Hi,

    You can do a projection when doing you query. Something like:

    var results = context.Query<Costumer>().Select(c => new { c.Id, c.Name });

    This query will generate an sql like:

    SELECT ID, NAME FROM COSTUMERS

    However, to avoid any performance issue, think to paging your queries, retrieving data un lots instead of loading the full table.


    • Proposed as answer by Sergio Villén Tuesday, November 25, 2014 6:03 PM
    Sunday, November 16, 2014 7:23 PM