views:

102

answers:

1

Thanks to this website I succeed to use a connectionString localized inside a web.config instead of the one provided in the app.config of the library. But my production and my test SQL Server do not have the same SQL user name.

Table(Name="SqlUserName.tableName")]
public partial class tableName : INotifyPropertyChanging, INotifyPropertyChanged
{
    ...
}

When I remove by hand the user name before the table name, it's working. But I still have to problems:

  1. Is it good to do that? Maybe there is a potential flaw I'm not aware of.
  2. If it's a good behavior how can I configure it somewhere? Each time that LINQ will regenerate the dbml, I will loose my modification. I think I can't move it to a partial class as it's an attribute and can't be redefined (I don't want to do it for all the tables also).

Thanks for your help.

A: 

Use same name for connection strings in web.config local and remote server but use different username and password for them.

I follow this practice and it is perfectly for me.

Sharique