Reputation: 361
I have a C# application in .net 3.5 using SQL Server 2008 R2.
I am using ado.net Entity Framework to generate the database but after generating it when I remove the database file from SQL Server the framework does not generate the database.
I want to generate database on users local machine while installation and have a password on database access and protect the data from being read or modified by a local user rather than my application.
So the question is how to achieve this with out encrypting the whole data?
What is the parallels here?
Upvotes: 0
Views: 47
Reputation: 754478
I don't think EF in .NET 3.5 was ever capable of creating a database at runtime.
You'll have to either upgrade to .NET 4 and EF 5 or 6 to use code-first with migrations to handle this, or then you need to write some code to handle that situation yourself, in .NET 3.5.
Also: a SQL Server database (file) doesn't have a password mechanism like Access or other file-based system do. Access to a SQL Server database is handled by the SQL Server itself by means of logins on the server, users on the database-level and permissions for those users.
Upvotes: 1