Thank you very much. You are a great teacher. Very cool !
@learnsmartcoding14 күн бұрын
Thank you! 😃
@somsharpАй бұрын
Thank you for the fantastic content! Just a suggestion-it would be wonderful if you could consider including Azure AD login for Swagger in this tutorial.
@learnsmartcodingАй бұрын
Thank you. Sure, I added to the list.
@DotnetKing-g2qАй бұрын
Hi Karthik thankyou so much for your amazing content, can I expect UI for this todo app.
@learnsmartcodingАй бұрын
Yes, definitely
@MP_04_02Ай бұрын
KK sir, how would I register DI for DBContext class for the database in SQL server ? Sir I have added the EF core package in Infra layer so how do I register DI for DBContext in program.cs ? I hope you got my point
@learnsmartcodingАй бұрын
Hi MP, Thank you for the question. For the DBContext, we register in the program.cs github.com/learnsmartcoding/CleanArchitecture-ToDoApp-DotNet8-WebApi/blob/main/TodoApp.WebAPI/Program.cs#L47 With this, you can use it as mentioned below. With this, the app can provide an instance of DbContext to the repository. github.com/learnsmartcoding/CleanArchitecture-ToDoApp-DotNet8-WebApi/blob/main/TodoApp.Infrastructure/Repositories/UserRepository.cs#L17 Hope I answered your question. Please ask if you have any other questions or if you need more info on the current question, feel free to let me know. I'm happy to answer! Happy coding!
@salar1997Ай бұрын
you will have to use builder.Services.AddDbContext just like this one builder.Services.AddDbContext(options => { options.UseSqlServer(builder.Configuration.GetConnectionString("DefaultConnection")); }); and in appsettings: "ConnectionStrings": { "DefaultConnection": "your connectionstring" } but i prefer to make a di injection class in the same project and send it over via IServiceCollection to keep program.cs cleaner
@MP_04_02Ай бұрын
@salar1997 yes I got that but dbcontext requires EF okay .. EF package has been installed in only Infrastructure layer
@MP_04_02Ай бұрын
@@learnsmartcoding thanks sir I got it now .. we have to use the reference of Infra layer in API project so as to use EF DBconext in program.cs
@salar1997Ай бұрын
@@MP_04_02 yeah i missunderstood, but instead of making a DI class only for dbcontext, just make a DependencyInjection class in infrastructure and lay dbcontext and the repository services there instead, then its not neccessary to add them in program.cs
@VijayPatil-id6ygАй бұрын
how many years of experience you have as .net full stack developer?
@learnsmartcodingАй бұрын
Hi Vijay , I have 15+ years of experience. Hope you liked this video.
@VijayPatil-id6ygАй бұрын
@@learnsmartcoding yes I really liked this video and May I request you to use Hindi also or maybe another channel in hindi