.edmx . :
Visual Studio File- > New- > Data- > Entity DataModel.
"EF Designer ".
SQL Server app.config "testConnectionString".
, .
.
Effort ( .edmx) CreateTransient, :
EntityConnection connection = Effort.EntityConnectionFactory.CreateTransient("name=testConnectionString");
MyDbContext context = new MyDbContext(connection);
, .
This is due to a warning, but if the code you are testing uses any navigation properties that depend on foreign keys, it will not work. This makes me wonder how valuable such “unit testing” is.
source
share