M
mehdi_mousavi
Hi folks,
Consider an ASP.NET web service that's supposed to do our business
logic, as well as persisintg data in a given database layer. The web
service in question is supposed to return million of thousands of
records as a named-dataset. By named-dataset I mean a dataset that has
got a known schema. For example, a collection of FirstName, LastName,
Phone Numbers and ... of peoples who work in the country. The
presentation layer is also supposed to filter this information based on
a given criteria, indicated in an HTML form by the end-user. I would
love to know what's the official way of developing such a service.
i.e.,
a) filtering a large amount of records,
b) returning back the large amount of records to the client, chunk by
chunk.
I've for example developed this service as follows:
[WebMethod(EnableSession=true)]
MyNamedDataSet FilterAndQueryLargeData(MyNamedFilterDataSet)
{
//If this is the first time the client calls this method, we need to
//get and filter the required information from the DataLayer
//based on MyNamedFilterDataSet.
//otherwise, prepare an instance of MyNamedDataSet filled by the
//required records, bookmark the current position (in someway),
//and return the dataset.
}
I would like, however, to understand what's the official way of
developing such a service.
Any help would be highly appreciated,
Cheers,
M.Mousavi
Consider an ASP.NET web service that's supposed to do our business
logic, as well as persisintg data in a given database layer. The web
service in question is supposed to return million of thousands of
records as a named-dataset. By named-dataset I mean a dataset that has
got a known schema. For example, a collection of FirstName, LastName,
Phone Numbers and ... of peoples who work in the country. The
presentation layer is also supposed to filter this information based on
a given criteria, indicated in an HTML form by the end-user. I would
love to know what's the official way of developing such a service.
i.e.,
a) filtering a large amount of records,
b) returning back the large amount of records to the client, chunk by
chunk.
I've for example developed this service as follows:
[WebMethod(EnableSession=true)]
MyNamedDataSet FilterAndQueryLargeData(MyNamedFilterDataSet)
{
//If this is the first time the client calls this method, we need to
//get and filter the required information from the DataLayer
//based on MyNamedFilterDataSet.
//otherwise, prepare an instance of MyNamedDataSet filled by the
//required records, bookmark the current position (in someway),
//and return the dataset.
}
I would like, however, to understand what's the official way of
developing such a service.
Any help would be highly appreciated,
Cheers,
M.Mousavi