2

Is there a way to build Entity Framework connection string to connect to a file-Database in a standalone c# application?

1
  • What do you mean by "file-database"? Maybe you can checkout Biggy - A File-based Document Store for .NET github.com/robconery/biggy Commented Sep 19, 2014 at 5:47

2 Answers 2

1

Something like this ?

<add name="ConnectionName"
    connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|DatabaseName.mdf;Integrated Security=True;User Instance=True"
    providerName="System.Data.SqlClient" />
Sign up to request clarification or add additional context in comments.

1 Comment

add @ before connection string connectionString=@""
0

You might take a look at Sql Express, which can be embedded directly into your application.

Quote from the page:

Do you need to embed SQL Server Express into an application? LocalDB is a lightweight version of Express that has all its programmability features yet runs in user mode and has a fast, zero-configuration installation. (...) LocalDB runs in-process with applications and not as a service.

You can download the installer from that same page.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.