TechTalk Genome v4.2

CompositeResultBinder Class

An abstract class providing base functionality for ExternalQueryResultBinders returning results of composite types.

For a list of all members of this type, see CompositeResultBinder Members.


public abstract class CompositeResultBinder : ExternalQueryResultBinder


To create a result binder returning MyClass for each rows:

            public class MyClassResultBinder : CompositeResultBinder
                static ExternalQueryResultBinder[]
                    GetInnerBinders(DataDomainSchema schema)
                    return new ExternalQueryResultBinder[]
                        // binder for Field1
                        new ScalarResultBinder(....),
                        // binder for Field2
                        new ScalarResultBinder(....)
                public MyClassResultBinder(DataDomainSchema schema) :
                protected override object Populate(object[] innerValues)
                    // innerValues[0] will be field1 and
                    // innerValues[1] will be Field2 (see GetInnerBinders)
                    return new MyClass(
                        (string)innerValues[0], (double)innerValues[1]);


Namespace: TechTalk.Genome

Assembly: TechTalk.Genome (in TechTalk.Genome.dll)


Editions: Professional, Evaluation, Express

Database Platforms: Microsoft SQL Server 2000, Microsoft SQL Server 2005, Orcale 9i Release 2, Oracle 10g Release 2

See Also

CompositeResultBinder Members | TechTalk.Genome Namespace