FetchDataRequest

5 posts, 1 answered
  1. Roger Blanchard
    Roger Blanchard avatar
    343 posts
    Registered:
    29 Jun 2018
    06 May 2020
    Link to this post
    There is an OVERLOAD for FetchDataRequest where we can pass a parameter object. I have a use case for this but I am wondering how to implement. I understand how to pass this parameter object as we use this with Savechanges. How do we pass what we need to fetch the data we want?

    PUBLIC FetchDataRequest (ISerializable)

    Purpose: Constructor for the FetchDataRequest class
    Notes:
    Parameters:
    poParameter Consultingwerk.ISerializable
    The value for the CustomParameter property
  2. Mike Fechner
    Mike Fechner avatar
    267 posts
    Registered:
    14 Sep 2016
    06 May 2020 in reply to Roger Blanchard
    Link to this post
    The overloaded constructors are just for convenience. You can still set the properties like Queries and Tables.

    Or you use a constructor with Queries and Tables and then set the CustomParameter as a property. 

    Some customers use the CustomParameter as the only argument to FetchData. In that case, the Tables and Queries are set in the BusinessEntity:FetchData() method by the consumer. 

    It all depends on how you are using the arguments.
  3. Roger Blanchard
    Roger Blanchard avatar
    343 posts
    Registered:
    29 Jun 2018
    06 May 2020 in reply to Mike Fechner
    Link to this post
    Is that parameter object e=retrieved on the backend using the SaveChangesParameter property? Or another property?
  4. Mike Fechner
    Mike Fechner avatar
    267 posts
    Registered:
    14 Sep 2016
    Answered
    06 May 2020 in reply to Roger Blanchard
    Link to this post
    No. It's retrieved using the CustomParameter property of the FetchDataRequest argument to the FetchData method.
  5. Roger Blanchard
    Roger Blanchard avatar
    343 posts
    Registered:
    29 Jun 2018
    06 May 2020 in reply to Mike Fechner
    Link to this post
    Perfect...thank you.
5 posts, 1 answered