I'm working on C# MVC 5 app that each user must username, password, server, and database to connect.
For each user, the authentication DLL will provide a unique connection string. The password works only for one user during a section time. Each user has different permissions on tables.
Where is the question? If you need to change connection string do it in Context.Database.Connection.ConnectionString, then call Open. It should be work.
using MVC 5 Controller with view, using EF .. ( make sure you have model and view like CRUD system) and if you want each user have unique connect , using guid();
https://msdn.microsoft.com/en-us/library/system.guid.newguid(v=vs.110).aspx
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.