Following is a difference between SqlDataSource and ObjectDataSource:
1. SqlDataSource is two-tier in nature where as ObjectDataSource supports three-tier architecture.
2. SqlDataSource requires very small amount of coding to connect with database. For ObjectDataSource more coding is required to build data access class.
3. SqlDataSource not support full encapsulation. ObjectDataSource supports full encapsulation.
4. SqlDataSource requires complete connection string to connect with database. ObjectDataSource exposes TypeName attribute that is a name of middle layer class may used to perform database related operations. Data access class must be placed in App_Code directory.
5. Caching is same for both controls but ObjectDataSource control fires NotSupported exception if return type of SelectMethod is other than DataSet.
2 comments:
Hi there, ObjectDataSource requires both business object and crud logic to be in the same class. How's about scanario, when bus objects have no intelligence and crud logic contains within a service (separate class, separate assembly)?
hello Mr Kuldeep ..ur post are very good and very usefull ...
Dear m new in asp.net m fresher and done MCa i feel difficulty in programming accoding to u wt i hav to do ?? i know each and every concept of dot net but not good in logic reply plz
Post a Comment