linq2db/ASP.NET
DI in DataConnection problem
#3632
-
Friends, hello. The wonderful linq2db supports working inside ASP.NET, including dependency injection. public FooDataConnection(LinqToDbConnectionOptions<FooDataConnection> options) : base(options) { ... } So if, for example, we go in to inject something into this class through the constructor: private readonly ISomeService _iSomeService;
...
public FooDataConnection(ISomeService iSomeService, LinqToDbConnectionOptions<FooDataConnection> options) : base(options)
{
...
_iSomeService = iSomeService;
...
} Then we get an error of the following form:
This seems to be wrong behavior. Because the constructor accepting |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Would it be possible for you to put together a demo project with a minimal code to replicate this issue? There's no indication here what the DI system is trying to construct when throwing this exception, so some more context would be helpful. |
Beta Was this translation helpful? Give feedback.
-
The issue is resolved in #3632 (reply in thread), #3634. |
Beta Was this translation helpful? Give feedback.
The issue is resolved in #3632 (reply in thread), #3634.