You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SqlStringLocalizerFactory.Create -method creates a new SqlStringLocalizer, which derives from IStringLocalizer.
The AboutController however expects a IStringLocalizer<SharedResource> and that is injected by the DI container, but how is the SqlStringLocalizer cast into IStringLocalizer<SharedResource> (as it does not derive from IStringLocalizer<T>)?
Suppose I'd like to create the SqlStringLocalizer manually (without the DI), would it be possible?
(And cast it to IStringLocalizer<SharedResource> so I can pass it along)
Thanks in advance,
Ilkka
The text was updated successfully, but these errors were encountered:
The
SqlStringLocalizerFactory.Create
-method creates a newSqlStringLocalizer
, which derives fromIStringLocalizer
.The
AboutController
however expects aIStringLocalizer<SharedResource>
and that is injected by the DI container, but how is theSqlStringLocalizer
cast intoIStringLocalizer<SharedResource>
(as it does not derive fromIStringLocalizer<T>
)?Suppose I'd like to create the
SqlStringLocalizer
manually (without the DI), would it be possible?(And cast it to
IStringLocalizer<SharedResource>
so I can pass it along)Thanks in advance,
Ilkka
The text was updated successfully, but these errors were encountered: