hi,
I created a MVVM project with a EntityDataModel (MyDataModel.edmx) and a related DataContext (MyDataContext), bound to a given DB schema. The resulting connection string in App.config is the following
<add name="MyDataContext" connectionString="metadata=res://*/MyDataModel.csdl|res://*/MyDataModel.ssdl|res://*/MyDataModel.msl;provider=Oracle.DataAccess.Client;provider connection string="DATA SOURCE=myDb;PASSWORD=pwd;PERSIST SECURITY INFO=True;USER ID=ADMIN"" providerName="System.Data.EntityClient" />
now I have to write a Login form, which does not perform a simple "select from users" query, but instead, it has to connect the application entity to the corresponding DB schema. In other words, I wish to change the MyDataContext connection string, switching from ADMIN/pwd schema provided at design time, to User/password schema provided at runtime.
How can I do this?
thanks for your help