0

I am developing a desktop application where different users can use the application on the same machine, the application should generate a different SQL Server CE database file for each user where the databases have the same schema (structure), and then generate an entity model from that database, how should I go about doing this ?

I am new to both the Entity Framework and the SQL Server CE engine, so I am willing to consider any solution.

1 Answer 1

1

Use Code First. With Code First you define your model in code and then the first time the application runs it will look for a database and if one doesn't exist then it can create that database for you. Your application should use a connection string for a SQL Compact database that points to a different location for each user. That way when a new user runs the application for the first time a database will be created for the user and that database will then be used subsequently for future uses of the application by the same user. Help on getting started with Code First can be found here: http://msdn.microsoft.com/en-us/data/ee712907

Sign up to request clarification or add additional context in comments.

1 Comment

i am accepting this as a correct answer since it is the only one given, i will look further into the matter, thank you.

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.