I'm working on a training project developing a DAL for Northwind with Entity Framework and another DAL with linq2db in the same project.
I keep getting the error when I run a test which uses linq2db:
LinqToDB.LinqToDBException : Configuration string is not provided.
I guess it's because I didn't follow the step 3 of the template "CopyMe.SqlServer.tt.txt", which says to add this to the web/app.config.file:
<connectionStrings>
<add name="Northwind" providerName="System.Data.SqlClient"
connectionString="Data Source=(local);Initial Catalog=Northwind;Integrated Security=true" />
</connectionStrings>
Because there's no such file in my project.
When I try passing the configuration like this, it doesn't work either, same exception:
using var db = new NorthwindDB(Resources.ConnectionString);
var q = db.Customers.Select(c => c);
foreach (var c in q)
Console.WriteLine(c.ContactName);
What should I do? What am I missing?
upd: Sorry for misinformation. When I pass the configuration explicitly, the exception is:
Configuration 'Data Source=(local);Initial Catalog=Northwind;Integrated Security=true' is not defined.