Search code examples
llblgen

LLBLGEN: How can I get only necessary list of columns with FetchPolymorphic method?


I have a list of tables and I'd like to select only necessary columns. How can I set filter witn FetchPolymorphic method?


Solution

  • FetchPolymorphic is done against an entity object when using SelfServicing so basically you are getting back an entity

    C#

    FamilyCarEntity car = (FamilyCarEntity)CompanyCarEntity.FetchPolymorphic(null, 4, null);
    

    VB.NET

    Dim car As FamilyCarEntity = CType(CompanyCarEntity.FetchPolymorphic(Nothing, 4, Nothing), FamilyCarEntity)
    

    Once you have the entity object back (table or view) you can access it's properties (fields)

    Using the Adapter is similar