These are the best. Helping me out so much in my first internship
@CuriousDrive4 жыл бұрын
Thanks for the kind words Michael. Welcome to the world of programming.
@CuriousDrive4 жыл бұрын
Code - github.com/CuriousDrive/BookStores Thanks for watching, please share with your friends :)
@raaz1234567895 жыл бұрын
Great series, nice step by step explanation and I appreciate it when you make changes and show their effect/changes Can you kindly add a new video on how to consume these api endpoints in a dotnet core web application please. Thanks
@CuriousDrive5 жыл бұрын
Thanks. I am currently working on that demo. Hopefully I can publish it in couple of days. Stay tuned!!
@amnesia34904 жыл бұрын
Thanks for the videos, you explain everything very clear i was looking whole day.
@CuriousDrive4 жыл бұрын
Awesome. Let me know if you run into any issues? Thanks for watching Please share with your friends, it helps :)
@yashparikh34127 ай бұрын
This is pure gold!
@MultiAkash19883 жыл бұрын
You made my day.... So easy explanation. Thank you very very much
@CuriousDrive3 жыл бұрын
Thanks for watching. Please share with your friends.
@chrisdev86154 жыл бұрын
congratulations for your work , and is good if you can show some kind of commons errors that can happens during development.
@CuriousDrive4 жыл бұрын
That's a great idea. I will keep that in mind and make a video on it.
@stefanstefanov98604 жыл бұрын
If you want to use postman, but you get could not get any response - you have ssl certificate problem. Go on postman, setting and then togle or togle off SSL Certificate validation.
@kandinagireddy Жыл бұрын
Tutorial is very good. Are there any new series on .Net 6/7/8/ Web api??
@fahadmullaji5 жыл бұрын
#Postman is one of the best tools to test you APIs.
@CuriousDrive5 жыл бұрын
Yes. I started using when I watched it being used in Microsoft demos. I love it dark mode. And you can also make the font size bigger. But you gotta love how easy it was to create those API methods using visual studio.
@fahadmullaji5 жыл бұрын
@@CuriousDrive Totally man. that's why I love visual studio. I used to be a java developer, started learning #.NET development in #VS that's when I realized how much time I used to spend doing basic things. it's amazing how #ASP.NET Web API works to VS team to get these things done.
@giahuynguyen828 Жыл бұрын
Thank you so much. It’s very nice 🎉 Sir, I have a question. I need to create all controllers except Author and Publicsher if I’m in a project right?
@anonimowyanonimowy5162 жыл бұрын
Thank you great series if anyone have .net 6 in Programs add builder.Services.AddDbContext(options =>options.UseSqlServer(builder.Configuration.GetConnectionString("BookStoresDB"))); and remove old controller it can help with common issue
@saurabhkatrojwar22903 жыл бұрын
After publish our MVC or API project, Controllers and Models .dll created in one single bin folder not seperately. Is it possible to generate dll of Controller and Models dll seperately in seperate folders. Thanks
@CuriousDrive3 жыл бұрын
It looks like that feature has been removed. Please refer to this article. www.learmoreseekmore.com/2021/11/dotnet6-application-no-longer-generates-a-seperate-assembly-for-views-by-the-razor-compiler.html
@saurabhkatrojwar22903 жыл бұрын
@@CuriousDrive Thanks Sir... Great Search
@reddeimon4753 жыл бұрын
i got this error: InvalidOperationException: Unable to resolve service for type 'BookStores.Models.BookStoresDBContext' while attempting to activate 'BookStores.Controllers.PublishersController'. what does it means?
@CuriousDrive3 жыл бұрын
Hello, you need to inject BookStoresDBContext in your starup class before generating the Controller from the models. I have explained that after creating the controller I believe.
@puthikma5 жыл бұрын
I did the same thing as you did but i got an error while I am running like An unhandled exception occurred while processing the request. InvalidOperationException: Unable to resolve service for type 'BookStoresWebAPI.Models.BookStoresDBContext' while attempting to activate 'BookStoresWebAPI.Controllers.PublishersController'. Microsoft.Extensions.DependencyInjection.ActivatorUtilities.GetService(IServiceProvider sp, Type type, Type requiredBy, bool isDefaultParameterRequired) Stack Query Cookies Headers Routing InvalidOperationException: Unable to resolve service for type 'BookStoresWebAPI.Models.BookStoresDBContext' while attempting to activate 'BookStoresWebAPI.Controllers.PublishersController'. Microsoft.Extensions.DependencyInjection.ActivatorUtilities.GetService(IServiceProvider sp, Type type, Type requiredBy, bool isDefaultParameterRequired) lambda_method(Closure , IServiceProvider , object[] ) Microsoft.AspNetCore.Mvc.Controllers.ControllerActivatorProvider+c__DisplayClass4_0.b__0(ControllerContext controllerContext) Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider+c__DisplayClass5_0.g__CreateController|0(ControllerContext controllerContext) Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker) Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext conte
@CuriousDrive5 жыл бұрын
To fix this issue you will have to add DBContext in your services. ConfigureServices function in your startup.cs class should look something like this. public void ConfigureServices(IServiceCollection services) { services.AddControllers(); services.AddDbContext(options => options.UseSqlServer(Configuration.GetConnectionString("BookStoresDB"))); } Let me know if you are still facing this issue
@puthikma5 жыл бұрын
@@CuriousDrive Thanks you you are amzing
@TechTanka4 жыл бұрын
@@CuriousDrive Where does "BookStoresDB" come from? where do you configure that? Do you have that on Settings json?
@OmnislashLimitbreak44 жыл бұрын
@@CuriousDrive Being 1:09 am, Mexico City time, I sincerely thank you.
@Manu-wb2uv4 жыл бұрын
@@CuriousDrive Yes now it works for this matter, but if I call the Author controller endpoint I get the same error in code :)
@dasamsandeep60874 жыл бұрын
I have done the exercise what u post.. I'm getting error like an unhandled exception occurred while processing the request kindly help
@CuriousDrive4 жыл бұрын
Can you please share the scenario for which it is failing?
@ajanyhc4 жыл бұрын
@@CuriousDrive In Startup.cs, add the following (it worked for me, bypassing 'launchSettings.json') string connectionString = "Server=.\\SQLExpress;Database=BookStoresDB;Trusted_Connection=True"; services.AddDbContext(options => options.UseSqlServer(connectionString));
@zabola125 жыл бұрын
Is there a way to make localhost:(port) something fixed instead of auto generated by vs code?
@CuriousDrive5 жыл бұрын
I would create an application on IIS and point the web API there.
@minhtuan7374 жыл бұрын
Nice sir, tks
@CuriousDrive4 жыл бұрын
Thanks for watching Minh.
@flaviusioan694 жыл бұрын
Smoth .....
@CuriousDrive4 жыл бұрын
Thanks for commenting Ioan.
@mysteriouspants60825 жыл бұрын
this is going to make me very lazy
@CuriousDrive5 жыл бұрын
Or you can take that time to think about real things. :)