SqlDataAdapter mycommand = new SqlDataAdapter (Selectcmd, MyConnection);
DataSet ds = new DataSet ();
Mycommand.fill (ds, "Track");
return DS;
}
Now the code relies only on the database, which is a good database channel that holds the SQL statements that access the table or view, and other code calls methods to complete the interaction with the database.
Controller
This reconfiguration method utilizes the code-hiding mechanism, in which the Controller is responsible for the control of the event and method in the case that the model part of the data access is relatively independent. The task of the model is clear, and it returns only a DataSet object. This implementation, like view code, does not depend on how the data is returned from the database.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.