0

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.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Maurício Pontalti Neri
  • 1,060
  • 1
  • 10
  • 17
  • Possible duplicate of [How to change sql server connection string dynamically in service stack](http://stackoverflow.com/questions/22712879/how-to-change-sql-server-connection-string-dynamically-in-service-stack) – Polynomial Proton May 18 '17 at 20:09

2 Answers2

1

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.

0

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