0

I have a C# project in Visual Studio with a SQL Server database. I have a problem with my PC and I lost the database and I don't have a backup or a script to recreate the database and this is medium large.

My question: is there a way to pass the dataset of my project to tables in SQL Server in an automatic way using some tool?

I ever heard that you could create databases from Visual Studio with Entity Framework, but I don't really know how it works.

Here's a screenshot of the dataset:

tables

file

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Stalin21r
  • 1
  • 1
  • 3
    You can certainly re-create the SQL scripts needed to create those tables, from your dataset - and once you do: **STORE THE SCRIPTS** in source control somewhere! – marc_s Mar 08 '23 at 05:56
  • DataSet itself is not a tool for restoring the database, it is a data container for operating and managing data in a C# project. Typically, a DataSet is used to store and process data retrieved from a database. – sssr Mar 16 '23 at 08:28

1 Answers1

1

Your question is duplicate of this SO question. The accepted answer provides a link to a tool that allows you to generate the database from the xsd file.

mehdi.loa
  • 579
  • 1
  • 5
  • 23