-2

I'm looking for a way to draw or create a schema for SQLite and based on it, generate the tables.

I'm doing a WPF application using C# and Visual Studio 2022.

What are the most common ways to do that?

Thank you in advance!

Jose Silva
  • 139
  • 6
  • 1
    Are you looking for a tool to do it or are you looking for guidance to create a tool to do it? Because if it's the first check out [Generating SQL from UML models](https://stackoverflow.com/q/16830514/9363973), if it's the latter then it's too broad for SO. – MindSwipe Oct 17 '22 at 06:37
  • 1
    [Where can I ask about "finding a tool, library, or favorite off-site resource?"](https://meta.stackoverflow.com/q/251134) – PChemGuy Oct 17 '22 at 06:43
  • Thank you @PChemGuy , I didn't know about SoftwareRecs (https://softwarerecs.stackexchange.com/) in StackOverflow. – Jose Silva Oct 17 '22 at 13:02

1 Answers1

1

The most popular way is probably to use entityframework, You can use code first approach to write your domain classes and generate tables from these. Be aware that there is both EF and EF core, the later for .Net core+, and the version numbers overlap.

You can also use EF with a database first design, create your tables in SQLite, and generate domain classes from this.

But you do not need to use an Object relational mapper. You can just create tables and SQL by hand. But this seem to be less common today.

JonasH
  • 28,608
  • 2
  • 10
  • 23