Could not resolve DbContext after deployment in Asp.Net Core 2.X

Multi tool use
I have a webapi in asp.net core 2.1 and that is working properly if I press F5 from the Visual Studio, I can hit my controllers, but when I deploy the application to the IIS, it says that it can resolve the DbContext on the Configure method.
My Configure
looks like this
on my ConfigureServices
I inject the dbcontext on this way
and as I said is working. In order to deploy the application to an IIS I added the following information on the Program class
The ApplicationPool is running under No Managed Code
do I need to check something else?
Issue was identified to be the connection string was using integrated security which was not working when deployed to run under IIS as web app was running under application pool identity. Since application pool identity does not have access to database, connection was failing.
Suggested fix was to create a new sql server login, assign that user to application database, update connection string to use the userid and password instead of integrated security.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.