Datasets support a disabled architecture. You can add local data, delete it, and then using the SqlAdapter you can transfer everything to the database. You can even load the xml file directly into the dataset. It really depends on your requirements. You can even establish memory relationships between tables in a DataSet.
And btw, using direct sql queries built into your application, is really a very bad and bad way to develop an application. Your application will be subject to "Sql Injection". Secondly, if you write queries like those built into the application, Sql Server must execute this execution plan every time, while the stored procedures are compiled, and this execution is already accepted when it is compiled. Also, the Sql server can change its plan as the data becomes large. This way you get better performance. At least use stored procedures and check for unwanted input. They are inherently resistant to Sql injection.
Stored procedures and a data set are the way to go.
See diagram:

Edit: If you use .Net framework 3.5, 4.0, you can use a number of ORMs such as Entity Framework, NHibernate, Subsonic. ORMs present your business model more realistically. You can always use stored procedures with ORM if some of the functions are not supported in ORM.
For example: If you write a recursive CTE (Common Table Expression) Stored procedures are very useful. You will run into too big problems if you use the Entity Framework for this.
TCM
source share