Error creating a distribution of an executable with sql database using the Entity Framework

2

I'm developing a desktop winforms application with C # in Visual Studio with Sql database through the Entity Framework. The intention is that it be a local database, the program will be installed on isolated machines, which have no access to any server. As always, on my machine it works normal (laughs), but testing on other computers gives a connection error with Sql Server.

I've been researching about this and saw that because it's impractical to install Sql Server on each machine, it would be best to use Sql Server Compact. However, I saw that unlike Server Express that generates .mdf files, Compact works with .sdf files.

In this the best way would be to reconfigure the Entity Framework to generate a Sql Compact bank or is there any other way to work with the .mdf Express database on a machine that does not have Sql Server Express installed?

    
asked by anonymous 02.05.2018 / 19:48

1 answer

1

I ended up finding a better solution for my need: SQLite. SQLite also supports the Entity Framework and ends up being much simpler to use in a stand-alone application, requires no additional installation on the user's machine, and the package already generates the necessary dlls. For those interested in a tutorial, this Link is a step-by-step guide on how to set up and use SQLite including Entity Framework.

    
08.05.2018 / 20:56