Click here to Skip to main content
15,902,198 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I m working on EF code fist using MVC. I would like to restrict the database for one application only in order to protect the database structure modification from the other application. Is there any way to restrict db with single application?
Posted

If you're asking how to restrict access to your database to only one instance of an application from a single machine there's no way I know of to do that.
 
Share this answer
 
Comments
phil.o 20-Jun-14 17:58pm    
In fact, there is :)
Single user mode is a real pita.
You can switch your database to single user mode; only one connection will then be possible at any time on this database.
But this is quite restrictive. Are you sure you will have to touch the structure of the database with your application? EF applications usually handle data rather than database structure.
 
Share this answer
 
Comments
Bhim B Thapa 23-Jun-14 8:57am    
When we use EF code first approach, it can alter the db structures.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900