1

I have this project made by someone else that's I'm refering in mine; it's a data access layer using Entity Framework.

So of course, when I compile my project, I have my executable, with its .config file.

Here's the kicker: How can I tell the data access layer DLL to which server and with which credentials to connect to it ?

If I open the DAL DLL in Notepad, I do see the connection strings hardcoded in it.

I have modified the DAL project to be able to handle many connection strings, but once compiled, it's baked in it.

Am I misunderstanding the internal workings of EF ?

Thanks a ton.

4

1 回答 1

0

您很可能希望将凭据存储到某种类型的配置文件中。有几种方法可以做到这一点。查看以下 MSDN 文章:安全注意事项(实体框架)

于 2013-09-13T16:45:10.727 回答