FindBy<> method in Typed DataSet.

H

Henry

Dear Group:

A question regarding the behavior of the Visual Studio.NET.

When I drag the "Customers" table in "Northwind" database on Server Explorer
to my web page, then select the DataAdapter object, and then right-click to
"Generate DataSet.." The C# class source file for this typed DataSet would
have the following method

public CustomersRow FindByCustomerID(string CustomerID) {
return ((CustomersRow)(this.Rows.Find(new object[] {
CustomerID})));
}

in the CustomerDataTable class. It's quite convenient to use that to do key
value search.

But if I have an XML file, and use XML Schema Designer to create the schema
for that XML file, select the primary key on the schema, and save the files,
the generated C# class source file would *not* have that "FindBy<key name>"
method in it.

Can someone advice how does VS.NET determines when to create that "FindBy"
method based on the schema attributes?

TIA.

from Henry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,538
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top