Dependency Injection in ASP.NET Core and issue with null suppresion
Hi, I'm having some issues with null suppression and dependency injection in ASP.NET Core
I have this block of code
And it wasn't able to resolve
I also tried with DbContext
And the returns
Also why is it returning null instead of telling that it is not able to resolve service?
Edit:
Thanks in advance
I have this block of code
And it wasn't able to resolve
I also tried with DbContext
And the returns
null, but doesn't throw. Isn't it supposed to throw for being null?Also why is it returning null instead of telling that it is not able to resolve service?
Edit:
AppDb is a class that inherrits from DbContextThanks in advance

