Code - github.com/CuriousDrive/BookStores Thanks for watching, please share with your friends :)
@waqasriaz303 жыл бұрын
I want to follow along the way in this tutorial series. I didn't find your BookStore.bak file as shown in the video. Please guide.
@CuriousDrive3 жыл бұрын
Please create a database named "BookStoresDB" and then run this script - www.github.com/CuriousDrive/BookStores/tree/master/Database%2FGenerateData.sql
@waqasriaz303 жыл бұрын
@@CuriousDrive thanks. It worked like a charm.
@taha58712 жыл бұрын
Prefer to put file .bat and we just import it.
@Lolatyou3325 жыл бұрын
Starting my own business, have a couple years of coding experience but not in all the right places yet. This and your blazor videos will help out, thanks. Hope your channel keeps growing as blazor gets more popular.
@CuriousDrive5 жыл бұрын
Starting a new business is lot work. I am glad that the videos are helping you. I try my best to explain the concepts. Don't hesitate to contact if you get stuck anywhere. Thanks for watching 😊
@lifEQuotes902293 ай бұрын
@@CuriousDrive you are so nice person thanks for to kind behaviour Allah always bless you.
@svantepanter4 жыл бұрын
Great tutorial, thank you! Right what I was looking for. When researching this topic (Web API) there is often a lot about interface and repository. The approach you showed is more easy to grasp for a beginner.
@CuriousDrive4 жыл бұрын
Yes the idea was to get people started with entity framework instead scaring them. Thanks for a lovely comment 😊
@waqasriaz303 жыл бұрын
A comprehensive video series. Loved your videos. There were two abruptions I faced when following your video series and can be improved: 1. The user login method wasn't created when using visual studio > add controller > scaffold new item. I presume you made it backstage and later in your uploaded videos, it suddenly appeared to viewers. Even, the scaffolding part was missing. 2. The link to your GitHub project > 'code.txt' file doesn't contain the code you showed in the videos. For the students, the video series is worth giving time. I learned a lot in such a short video series about Web API and associated tooling to professionally handle this project. The knowledge given in this series highly overrides the above abruptions being pointed.
@CuriousDrive3 жыл бұрын
Thanks Waqas, that's an awesome feedback. I see what you are saying about the login method. I did add that behind the scenes and did not scaffold it. But visual studio wouldn't have scaffolded as it not one of the EF Core method. I hope that makes sense. And I used "code.txt" file for back up, it is not part of the tutorial. Thanks again for suggesting this tutorial to students.
@paul467224 жыл бұрын
Thanks for the clear tutorial. I normally use SQL Server with stored procs and data access layers. This EF is all new to me so it's very useful.
@CuriousDrive4 жыл бұрын
Yes, it's very easy to use. Makes our lives easier. Thanks for watching the video.
@simonroyjonesuk3 жыл бұрын
Brilliant video. Very clear and I learnt a lot. Thank you.
@CuriousDrive3 жыл бұрын
Thanks for watching Simon. I made another video in which I made this process even easier and covered more topics. Hopefully this one will be helpful. kzbin.info/www/bejne/eqC8nqN3hdScrqs
@kumaresanettiyannan64534 жыл бұрын
Awesome tutorial.. crisp and clear information. thank you.
@CuriousDrive4 жыл бұрын
Thanks for watching Kumaresan, Please share with your friends :)
@thainguyenphuong91543 жыл бұрын
Video is very important to me. Thank you bro!
@CuriousDrive3 жыл бұрын
I am glad this was helpful to you. Please share with your friends :)
@yogeshkulkarni94064 жыл бұрын
This is a good tutorial. I am yet to watch remaining videos in the list, but I must say that the beginning is good :) Thank you..
@CuriousDrive4 жыл бұрын
Thanks Yogesh. Let me know if you run into any issues.
@WikkiOnIlluminati4 жыл бұрын
Awesome video series. Best and quick learning. thanks
@CuriousDrive4 жыл бұрын
Thanks for watching Wikki. and thanks for a lovely comment.
@ramarch08034 жыл бұрын
Thank you so much, this video is amazing from all videos which are uploaded on youtube really thank you so much...
@CuriousDrive4 жыл бұрын
Thanks for watching Riti. Please share with your friends :)
@arifjaved5924 жыл бұрын
Probably the best video series to learn reverse engineering in . Net core web api.. Thank you so much sir.. If possible please make videos where we will have to join tables in db first approach using ef core
@CuriousDrive4 жыл бұрын
Thank you so much for kind words Arif. Actually, I have already made a video on loading data from related tables. Loading related data video -> kzbin.info/www/bejne/j6bGf2qHqsR_etU and you can find the whole series here -> kzbin.info/aero/PL4WEkbdagHIQVbiTwos0E38VghMJA06OT
@arifjaved5924 жыл бұрын
@@CuriousDrive actually i am new to your channel... I will surely go through all of ur videos.. Keep making such videos sir
@CuriousDrive4 жыл бұрын
Welcome to the channel. Please subscribe and share with your friends. You can also ask questions on Sunday morning live stream. Please try to be part of it.
@leratomphahlele19083 жыл бұрын
Best series I found on the topic
@CuriousDrive3 жыл бұрын
Thanks for a lovely comment lerato :)
@pw.704 жыл бұрын
Simple and concise - thank-you.
@CuriousDrive3 жыл бұрын
Thanks for a lovely comment P W. I am glad you found the video helpful
@codingwithelhacen9903 жыл бұрын
New Subscriber here. Thank you for sharing this video. Great explanation! Please keep up the great work. Followed through with no problem.
@CuriousDrive3 жыл бұрын
Thanks for an awesome. Let me know if you run into any issues.
@stoic24544 жыл бұрын
This is awesome, loved your vdo, easy to understand, to the point, thank you so much.
@CuriousDrive4 жыл бұрын
Thanks for watching himanshu
@yigitcankeskin86592 жыл бұрын
so good video , THANK SO MUCH.
@CuriousDrive2 жыл бұрын
Thanks for watching yiğitcan keskin!!!
@ahmetselcukzengin76642 жыл бұрын
Thanks a lot , great tutorial and reminder (:
@CuriousDrive2 жыл бұрын
Thanks for watching Ahmet.
@alfonsovillegas4895 жыл бұрын
Thanks for this. I hope you can cover on future parts how to create an independent method for each CRUD operation instead of using the same method for all operations... And how to call each method from one on the UI technologies you mention at the begining.
@CuriousDrive5 жыл бұрын
Yes. I am going to cover all the important features of Entity Framework Core and ASP.NET Core Web API in this series. And the idea is to call this Web API from my Blazor and Xamarin project that I have already posted on my channel. And hopefully I can also call it from flutter,android and all the other cool languages in next projects....
@alfonsovillegas4895 жыл бұрын
Curious Drive That’s amazing, will keep in touch, subscribed!
@guillermoruiz35685 жыл бұрын
Hi, this is the first video that I see and I really liked it, you have a new subscriber. If you fix a new project, use DataBaseFirst or CodeFirst?
@CuriousDrive5 жыл бұрын
Honestly it depends on the size of your project. If you are making a project where you have less than 10 tables and you don't really care about your data in the future then CodeFirst is a easy and fast approach. But you have lot of data now or there will be in future then I would go with DatabaseFirst approach. Because then I have freedom to switch to any other ORM framework. And you won't have to maintain your migrations. Your architecture should be independent of your framework. Always build your base first. that's how I code :)
@josephdsilva49412 жыл бұрын
Very Useful Content, Thanks a lot...
@greendeer24373 жыл бұрын
Hi great tutorial! But how did you get the BookStoreDB at 2:40 is that something you made earlier? If so how would I create it? Or If you know any other tutorials similar that I could look at that would be great.
@CuriousDrive3 жыл бұрын
Hello Green Deer, I have added the DB script to generate the BookStoresDB. Please check below GitHub repo for that. github.com/CuriousDrive/BookStores
@Vitoman1233 жыл бұрын
Thank you. Very good tutorial
@CuriousDrive3 жыл бұрын
Thanks for watching Viktor. Please share with frandzzz :)
@theachyller694 жыл бұрын
You're saving my live!!!!! thanks man
@CuriousDrive4 жыл бұрын
Thanks for watching Tang. Let me know if you run into any issues :)
@shaikhakhtar38575 жыл бұрын
Really nice video, Please make videos on step by step project implemention too
@CuriousDrive5 жыл бұрын
Hi Akhtar, I am not sure if I am following your feedback. Can you please elaborate?
@cwmizner Жыл бұрын
Outstanding, thank you!
@BudiSantoso-er6cq4 жыл бұрын
Great tutorial, thanks very much bro..
@emilgabrielharabagiu8984 жыл бұрын
Can somebody explain to me why he has "bookAuthors" array at 9:50? The model generated by scaffolding command made the field for that? When i use it myself, it was not created. Thank you in advance!
@emilgabrielharabagiu8984 жыл бұрын
Nvm, i got it!
@CuriousDrive4 жыл бұрын
I am glad that you figured it out
@emilgabrielharabagiu8984 жыл бұрын
@@CuriousDrive Thank you for making such a greate videos! I want to ask you something: there is any chance to make a video about implementing JWT in Angular? I think there are alot of people who are searching for frontend stuff explained in the way you do.
@Artavazd.kirakosyan4 жыл бұрын
let me ask one more question, as I understood, whenever we make a call to database, we create new instance of context, and as so, we pull of all of the data (including all of BbSetsName ) from databases to our context object. did I get correct? in other word, this approach is assumes heavy data transfer from/to database .
@CuriousDrive4 жыл бұрын
No. EF core does not make call to the database when you create the instance of DBContext. It makes calls when you access the DBSet. And if you use LINQ to filter your collection then it creates the query with where condition. Performance was the main focus when they were designing EF core. I hope that makes sense
@Artavazd.kirakosyan4 жыл бұрын
@@CuriousDrive Thanks for the explanation.
@Mimsy1244 жыл бұрын
The luckiest number ever :) Nice video , thanks a lot
@CuriousDrive4 жыл бұрын
It's fun making these demos. Thanks for watching :)
@IPanonima174 жыл бұрын
you have saved my semester, thanks a lot
@CuriousDrive4 жыл бұрын
You made my day!!!
@athiraramachandranl16053 жыл бұрын
Iam using Postgresql. When Iam connecting using command Build fail msg is showing in console. Default project and connection is correct. Could u help for this
@CuriousDrive3 жыл бұрын
Hello Athira, If you are getting build error when you run the command then you have build errors in the current solution. Please fix those and then run the command. If you are getting build error after running this scaffolding command then please share the error message. I will try and look up the error. It could be something related to PostgreSQL database.
@mithileshpandey98853 жыл бұрын
in asp.net core web api : if there are 10 method in one controller i want 10 method return in json formate and 10 method return in xml formate then how will do it?
@CuriousDrive3 жыл бұрын
Hello Mithilesh, sorry for the late reply. Please check below article for producing responses in different formats docs.microsoft.com/en-us/aspnet/core/web-api/advanced/formatting?view=aspnetcore-5.0
@Artavazd.kirakosyan4 жыл бұрын
I got a question to ask regarding to controller, here you use very simple way to connect to database to pull or add a new data (i.e. author). in other cases, many people use dependency injection where they need to go through series of settings in startup, repositories, and controller (particularly dependency injection in controller). just wondering which approach is preferable? this one (i.e. using(new connection object ... )) is obviously more simple in terms of configuring and using in controller....
@CuriousDrive4 жыл бұрын
Artavazd, that's a great question. The reason why I did not use dependency injection in this case because it would had been difficult for beginners to understand EF Core. But if your DI concepts are clear and you know how your app should be structured to be durable then please use DI.
@Artavazd.kirakosyan4 жыл бұрын
@@CuriousDrive thanks for replay. I got your point. better to learn and understand the both approach.
@ersingencer802 жыл бұрын
so simple and great tutorial thank you so much
@natep74252 жыл бұрын
Great content! I have a question, for the Scaffolding Command, what happens if you want to update the EF based on new updates made to the database? What is the command for that?
@CuriousDrive2 жыл бұрын
Hello Nate. same command. Just use "-f" at the end of the command. That regenerates the models and DdContext and overrides the current files with updated models. Please check below article. docs.microsoft.com/en-us/ef/core/managing-schemas/scaffolding?tabs=dotnet-core-cli#updating-the-model
@nehagarg90914 жыл бұрын
Hey. I am geting, InvalidOperationException: No database provider has been configured for this DbContext. Issue Description , can you suggest possible solution.
@CuriousDrive4 жыл бұрын
It looks like project is not able find which DB provider you are using. Did you install SQL Server DB provider? If not then you can get it from - www.nuget.org/packages/Microsoft.EntityFrameworkCore.SqlServer/ Also when do you get this error message. When you compile, run or some other time?
@gokul40604 жыл бұрын
Hi. How to use db scaffold if a table doesnt have any primary key? I am able to use the command. but get an exception while making the request- InvalidOperationException: The navigation '' cannot be added because it targets the keyless entity type ''. Navigations can only target entity types with keys.
@CuriousDrive4 жыл бұрын
I don't think it is currently possible. Even I did not know about this until I googled about it. Please check below resources. stackoverflow.com/questions/39701068/scaffold-dbcontext-creating-model-for-table-without-a-primary-key github.com/dotnet/efcore/issues/5719 github.com/dotnet/efcore/issues/5913
@gokul40604 жыл бұрын
@@CuriousDrive Thank you for quick reply :)
@CuriousDrive4 жыл бұрын
Thanks for asking very good question Gokul. Please subscribe to the channel and share with others :)
@gbmarshall2 жыл бұрын
I have a large database with 190 tables... I've generated the entity framework model... how do I auto generate the web api from the entity framework model? I don't want to do it buy adding a controller for each table...
@rp43612 жыл бұрын
For all who are facing issues with scaffolding-dbcontext. Below is the updated command - dotnet ef dbcontext scaffold "Your conn string" Microsoft.EntityFrameworkCore.SqlServer -o Models Basically the command has been changed in later versions.
@talkathiriify5 жыл бұрын
Amazing Thank you very much.
@selvakumarv13413 жыл бұрын
Hi friend, How can i get data through stored procedures?
@CuriousDrive3 жыл бұрын
Hello Selvakumar, Please follow this article for calling stored procedures in EF core. www.entityframeworktutorial.net/efcore/working-with-stored-procedure-in-ef-core.aspx
@selvakumarv13413 жыл бұрын
Thanks 😊
@auchucknorris3 жыл бұрын
question on the "using" statement I'm new to c# and was just wondering what this called due to the size or Bookstoredbcontext and wanted to dispose of this reference after being implemented?
@CuriousDrive3 жыл бұрын
I am glad to hear that you are learning C#. "using" statement is used when you want to dispose the object after the code block. This is usually used with the objects which use lot of resources or open connections when they are initialized. We don't want those objects in the memory forever.
@auchucknorris3 жыл бұрын
@@CuriousDrive I'm sure it way is fine but I see most places use the read-only with constructor approach rather than using
@phongvu24313 жыл бұрын
Can you share first database? i found the database on your github but i want the original database at the start of the course
@CuriousDrive3 жыл бұрын
I am afraid I don't have that anymore. Are you facing any issues running below query? github.com/CuriousDrive/BookStores/blob/master/Database/GenerateData.sql
@KearlHat3 жыл бұрын
How to run sql against context or create a json structure like "books by publisher"?
@CuriousDrive3 жыл бұрын
Hello Kearl, I think you are looking for loading related data. I made a video about it in the same series. Please check the video below. kzbin.info/www/bejne/j6bGf2qHqsR_etU
@mememonster23703 жыл бұрын
wat if i added new table in sql server? i should create model manually
@CuriousDrive2 жыл бұрын
I have a feeling that you have already watched rest of the series already. That must have answered your question
@shashikantkasera Жыл бұрын
how to solve this issue ( A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)) , i am using .net core 7
@yudaguntoro93272 жыл бұрын
how i can share my API and request from another PC with local network ?
@CuriousDrive2 жыл бұрын
You can run the API and share the IP address of your machine and port number on which the API is running on to whoever wants to use it. Or you can host it on IIS. I have made a video about it. Please check the link below. kzbin.info/www/bejne/mGHZZZKBq5mSiKM
@AMIRKHAN-dm2fm4 жыл бұрын
Thanks but I have question? How we can create multiple Get Methods in a same Controller with different method names.?
@CuriousDrive4 жыл бұрын
Yes totally. As we progress in the series, I am creating multiple GET methods in a controller.
@AMIRKHAN-dm2fm4 жыл бұрын
@@CuriousDrive Thanks I am waiting and plz try to make tutorials for how to consume WEB APIs in Xamarin.Forms with Azure like a complete realtime application.
@anbhuonline Жыл бұрын
am i the one not able to find the .bak file in the said git link?
@kandinagireddy Жыл бұрын
Tutorial is very good. Are there any new series on .Net 6/7/8/ Web api??
@toddcagelives3 жыл бұрын
The DbSets are plural in the latest release :)
@CuriousDrive3 жыл бұрын
Yes. I noticed that. I am actually working on creating another video series for EF Core .NET5 and .NET6(when it gets released). Thanks for your comment. I am sure that will help others.
@mp-ot7fw4 жыл бұрын
Thanks for the refresher on scaffolding and EF, and for showing me how to create an API. How did you make your data list show with carriage returns? Mine shows across my browser window without line breaks. Is that a rendering setting somewhere?
@CuriousDrive4 жыл бұрын
It's json formatter chrome extension. 😊
@mp-ot7fw4 жыл бұрын
@@CuriousDrive Thanks that worked!
@moliv89274 жыл бұрын
Amazing video!
@CuriousDrive4 жыл бұрын
Thanks for watching 😊
@whooomzoilo48333 жыл бұрын
If i have a Burger class with salad class relationship and the salad i want is already in the database, how do I connect it to my new burger when I add it to database??
@CuriousDrive3 жыл бұрын
Hello Whoomz, great question. Please check my video on "Loading Related Data". Link below. kzbin.info/www/bejne/j6bGf2qHqsR_etU
@janmarcinkowski71843 жыл бұрын
When I run Scaffolding Command. I get this error: The specified deps.json [D:\git\INT3RCEPT0R\Magazyn\MagazynSkladowania\MagazynSkladowania\MagazynSkladowania.deps.json] does not exist Can You help me?
@CuriousDrive3 жыл бұрын
What version of dotnet are you using?
@janmarcinkowski71843 жыл бұрын
@@CuriousDrive Microsoft .NET Framework Version 4.8.04084
@CuriousDrive3 жыл бұрын
That's why you are getting that error. This command is for .net core 3.1 or greater. I would suggest installing .net 5 as that's latest
@janmarcinkowski71843 жыл бұрын
@@CuriousDrive How and Where can I change it?
@janmarcinkowski71843 жыл бұрын
@@CuriousDrive When I create new project in .NET Core 3.1 (LTS). I get same error
@amnesia34903 жыл бұрын
How can I add Identity for existing database ?
@CuriousDrive3 жыл бұрын
I would create a Blazor app with Auth support in it and then replace the connection string in the app with the connection string of your database and then spin it off for generating the identity columns.
@ioanabondoc38444 жыл бұрын
Hello! Is there a reason why you installed 3.0.0 and not 3.0.1? I know you said you've created 3.0 Web API project, so in this case you cannot install packages that are greater than 3.0.0?
@CuriousDrive4 жыл бұрын
When was working on this demo, 3.0.1 had just come out. And I did not want to run into the issues during the demo. But it should work just fine. Actually, I suggest viewers to install the latest .NET
@ioanabondoc38444 жыл бұрын
@@CuriousDrive thanks. I usually don't install the latest latest because it's possible to not work with tutorials in general and to search for the solutions all over the internet :)) (I only do school projects)
@CuriousDrive4 жыл бұрын
Ohh okay. Let me know if you run into any issues. Here to help!!!
@rajasekharareddy71173 жыл бұрын
Hi Man, I am new to IT. I am getting errors when I restore your Database backup to my SQL SQL server. Please can you share the latest backup or script? Thanks in advance
@CuriousDrive3 жыл бұрын
Hi Rajasekhara, I know other people were getting some errors too. I changed the way you can restore the database. Please create a database named "BookStoresDB" then run the script at "BookStores/Database/GenerateData.sql". I have written the instructions at - github.com/CuriousDrive/BookStores
@imran2march5 жыл бұрын
Hi Amazing work Quick question you didnt mention if we need few tables not all the database tables as i have 100 tables and not requires all the tables. Also how we play with sql stored procedure any video for it
@CuriousDrive5 жыл бұрын
Hey Imran, I did miss out on mentioning that. I think I mentioned in comment section of my next video on how to do that. I am going to make videos on how to call stored procedure in my future videos I just thought of covering authentication and authorization part first.
@flaviusioan694 жыл бұрын
Thnx for this easy tut...
@CuriousDrive4 жыл бұрын
Thanks for watching Ioan. Please subscribe and share with your friends
@rejithkumar48914 жыл бұрын
I am getting below Error An assembly specified in the application dependencies manifest (ApplicationName.deps.json) was not found:
@CuriousDrive4 жыл бұрын
When are you getting this exception? Have you cloned the GitHub repo?
@kokilakawshalya23804 жыл бұрын
Hi! when restore the backup file there was an error occurred as "ADDITIONAL INFORMATION: System.Data.SqlClient.SqlError: The database was backed up on a server running version 14.00.3006. That version is incompatible with this server, which is running version 11.00.2100. Either restore the database on a server that supports the backup, or use a backup that is compatible with this server. (Microsoft.SqlServer.SmoExtended)" . how can I restore this backup file.
@CuriousDrive4 жыл бұрын
Hello Kokila, It looks like the backup is not compatible with your SQL Server. I suggest that you should create the DB named as "BookStores_DEV" and then you can run below query to generate the schema and data in that in DB. github.com/CuriousDrive/BookStores/blob/master/Database/GenerateData.sql Thanks for watching.
@kokilakawshalya23804 жыл бұрын
@@CuriousDrive thank u so much!
@kandinagireddy Жыл бұрын
Hi , Is there any update from your channel?
@ganesans56412 жыл бұрын
good work and thanx
@chrispotvin59775 жыл бұрын
Could you include the mdf file to your db? the.Bak file is incompatible with my server version. Alternatively, you could include the query you used ot create the file. TIA.
@CuriousDrive5 жыл бұрын
@Chris - I added the script in GitHub repo, which will generate schema and data for you. :)
@ajanyhc4 жыл бұрын
@@CuriousDrive I installed the latest sqlexpress and followed you instruction on how to regenerate the schema, but getting error "Severity Code Description Project File Line Suppression State Error SQL80001: 'SORT_IN_TEMPDB' is not a recognized CREATE TABLE option. BookStoresWebAPI C:\Learn\MicroSoft\UsingVisualStudio\Blazor\BookStoresWebAPI\GenerateData.sql 939 " when I tried to execute the query file. Any suggestion?
@ajanyhc4 жыл бұрын
I deleted the 'offending' line --> reran the query --> GOOD!!!
@fifigame60893 жыл бұрын
Hi there, Nice to meet you, i would like to thank you about your videos ! i have one question regarding JWT Token i have an issue with UserWithToken Model, because when i implemented your code i still have an issue to return UserWithToken Object could you please show me the Model or let me know how can i resolve my issue. Many thanks in advance.
@chaabanitasnim93764 жыл бұрын
This was useful, however I have a problem! Evertime I run the Scaffold-DbContext command it says "Build Failed" can anyone help me with that ?
@CuriousDrive4 жыл бұрын
Hello Chandini, that means you have syntax error somewhere in the code and you will have to fix it before scaffolding your database.
@ncastillozam4 жыл бұрын
Esto sucede porque tienes que tener el "Sql Server Management Studio" Conectado, ejecútalo para que tu instancia este disponible y se pueda realizar el Scaffold, saludos
@softwareenthusiasm36672 жыл бұрын
Instead of adding ,update Author in same [HttpGet] which is not recommended, there are many http method can handle CRUD functionalities.
@Artavazd.kirakosyan4 жыл бұрын
thanks for the video, trying to import the databas.bak file, but failed, any tips or advise?
@CuriousDrive4 жыл бұрын
You are welcome Artavazd, you can use below query to generate the data. Please follow the instructions on the GitHub repo. github.com/CuriousDrive/BookStores/blob/master/Database/GenerateData.sql
@Artavazd.kirakosyan4 жыл бұрын
@@CuriousDrive thank you very much for your help. it worked, but something was really strange happen... when I downloaded the file, and then I imported that file to server management studio, it did not work, so I had to open the file in web browser, copy the contents from the browser into the new query file, and then execute it, otherwise, the generatedata.sql file didn't work... when I checked the contents of the generatedata.sql file in notepad, it turned out that it has a mainly html tags (similat of the github page),....
@AjiMustofa-nx1xo4 жыл бұрын
how do I use the database that you provide, I've downloaded it and then after that I enter it into mssqlserver. after I clicked the "execute" button then an error occurred.
@CuriousDrive4 жыл бұрын
Hello Aji - what error are you getting? Maybe I can update the query to fix it for everyone?
@AjiMustofa-nx1xo4 жыл бұрын
@@CuriousDrive There are quite a lot of error messages, such as Incorrect syntax near 'CONTAINMENT' then there is Valid values of the database compatibility level are 80, 90, or 100. And also User does not have permission to alter database 'BookStores_DEV', the database does not exist, or the database is not in a state that allows access checks. At the end of the message, it says ALTER DATABASE statement failed. did I do something wrong? (I'm using mssql server management 2008 by the way)
@danhnguyenthanh88492 жыл бұрын
Great video
@cessargraux4 жыл бұрын
can i do this on linux? how can I add nuget packages in terminal?
@CuriousDrive4 жыл бұрын
Yes. You can use dotnet CLI commands to install nuget packages on linux or mac machines. Please check the below command for EF Core package. dotnet add package Microsoft.EntityFrameworkCore --version 5.0.2
@anirudhsingh86193 жыл бұрын
nice tutorial
@CuriousDrive3 жыл бұрын
Thanks for watching Anirudh :)
@sunilanthony174 жыл бұрын
Why store the DB Connection String in your Context instead of Storing it in your appsettings.json?
@CuriousDrive4 жыл бұрын
Hello Sunil, I fixed that as part next episode. you can find that episode here - kzbin.info/www/bejne/bZKaq4yFibmLiNU
@sabarinathkr76034 жыл бұрын
Getting this Error on running Saffolding command - Exception has been thrown by the target of an invocation.
@CuriousDrive4 жыл бұрын
Can you please paste the whole stack trace here? I am not sure why you are getting the error. Maybe you don't have the correct .NET framework installed.
@Abie1693 жыл бұрын
I use this command and works Scaffold-DbContext -Connection "Server=.;Database=BookStoresDB;Integrated Security=True;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models
@enriqueruiz3204 жыл бұрын
Excelente
@CuriousDrive4 жыл бұрын
Thanks Enrique. Please share with others :)
@mithileshpandey98854 жыл бұрын
How to Access/Use/ Call Stored Procedure in Entity Framework Core 3.1 DATABASE First Approach C#
@CuriousDrive3 жыл бұрын
Mithilesh, I have plans to make another video series on ASP.NET Web API for .NET 5 & 6. I am going to add this topic in the new series. Thanks for the suggestion.
@jomarsalazar25724 жыл бұрын
Hey can i ask what your database look like before scaffolding it? btw I'm using mysql is it necessary for that?
@CuriousDrive4 жыл бұрын
Sure. Please check file at BookStores/BookStoresWebAPI/Database/Backups/BookStoresDB.sql. If you run this file in your SQL express you will be able to take a look at the data. You will have you use Pomelo.EntityFrameworkCore.MySql package to scaffold
@jomarsalazar25724 жыл бұрын
@@CuriousDrive ok thanks
@charlesm.16384 жыл бұрын
What about getting the record based on the id entered into the get?
@CuriousDrive4 жыл бұрын
Hey Charelse, I covered that part in below demo. kzbin.info/www/bejne/q4GtY2BsjrWFoK8 Let me know if you have questions related to that video.
@charlesm.16384 жыл бұрын
@@CuriousDrive Thank you.
@nadaraialuka3 жыл бұрын
Luv you maaaan
@CuriousDrive3 жыл бұрын
Love you too bruh!! Thanks for watching. Please share with your friends :)
@thyeaa5 жыл бұрын
May i know how do you know that after localhost/author? how do you know it is "author"? Have you define it somewhere else? Sorry for asking, i am still new to web api
@CuriousDrive5 жыл бұрын
You will have to define the route on top of your controller. Like this [Authorize] [Route("api/[controller]")] [ApiController] public class AuthorsController : ControllerBase {} Where [controller] attribute is the name of the controller "AuthorsController". Then the path will be localhost:port/authors
@thyeaa5 жыл бұрын
@@CuriousDrive does the "authors" is substring from any strings? Or automatically it will be like that? Is there any docs I can refer to? Thanks.
@CuriousDrive5 жыл бұрын
Yes. "Authors" is substring of "AuthorsController" hence the path "localhost/authors". They have designed it in this way so that developer maintain the consistency through the project. Check out this below link. They have mentioned how routing works in ASP.NET web api docs.microsoft.com/en-us/aspnet/core/tutorials/first-web-api?view=aspnetcore-3.1&tabs=visual-studio#routing-and-url-paths
@sujashreemurugesh91064 жыл бұрын
Awesome tutorial. May i know command for How to remove BooksDBContext and add another Database? Through command prompt package manager console. scaffolding
@CuriousDrive4 жыл бұрын
Thanks for commenting Sujashree. Is this what you are looking for? Scaffold-DbContext 'Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=Chinook' Microsoft.EntityFrameworkCore.SqlServer
@Jiz394 жыл бұрын
this explanation really helps me..thank you ! could you please explain web api using 3 layered architecture and MVC together.
@CuriousDrive4 жыл бұрын
I am glad that it was helpful. your suggestion sounds like whole another series that I should work on.
@Jiz394 жыл бұрын
@@CuriousDrive Thank you..! Im looking forward to it. But in that there wont be any view or presentation layer. it wud be API. In Api -Controller ,Business Layer -Model .then Data Access Layer where database connections and queries are written. Applying dependency injection. Without Entity Framework .only asp .net core + Web Api. using stored procedures in sql server .performing CRUD operation with a siple example so that beginners like me could easily understnd. thank you Again.
@Jiz394 жыл бұрын
@@CuriousDrivelike Controller and Interface (Repository /Service Pattern) |using ASP.NET Core Web API performing Basic CRUD operation
@doncharly77234 жыл бұрын
Is it possible for you to increase the sound and upload the files? This sound is very feeble. Video looks great.
@CuriousDrive4 жыл бұрын
They seem to be fine for other people. You can download this video and use some online tools to increase audio gain f you'd like. I will loose view counts if I re-upload these videos, also subscribers won't like that.
@svantepanter4 жыл бұрын
Works fine for me!
@klsonic4 жыл бұрын
Is the web api you've created a rest api?
@CuriousDrive4 жыл бұрын
Yes. You are correct.
@alirezanikravesh17633 жыл бұрын
Thank you for this video. It's very useful. How to set database user name and password on connection string?
Jeremaine, YES. the only thing that you will need to change is the provider in that case. You can follow this article - dev.mysql.com/doc/connector-net/en/connector-net-entityframework-core-scaffold-example.html
@samreenfarooq82742 жыл бұрын
I had to add "TrustServerCertificate=True" in connection string as well otherwise it wasn't running
@akshayparashar23484 жыл бұрын
hey can u pls tell me how to update generated models from scaffolding?
@CuriousDrive4 жыл бұрын
Hello Akshay, I am explaining that in the next episode of the series.
@thanhatle72573 жыл бұрын
All are good, but I think u need to talk loudly and clearly, cuz I did had my volume up to 80 to watch the video >v
@CuriousDrive3 жыл бұрын
I know. Other people complained about that too. I did not have a good microphone and no video editing skills. The new videos are better. Thanks for watching this one :)
@AbdulRafay-wy3ve2 жыл бұрын
anyone help me how to import giving database into my database??
@LuigiZambetti5 жыл бұрын
Hello, could you suggest me the best book on EF Core and Web API Core? Maybe one that you have used to in the past.
@CuriousDrive5 жыл бұрын
Hey Luigi, I personally read either from microsoft docs - docs.microsoft.com/en-us/ef/core/ or this website has very organized information about EF in general - www.entityframeworktutorial.net/what-is-entityframework.aspx I see what you are saying though, I miss reading books too. These frameworks are updated every quarter, I don't think any book will be good as it will be outdated pretty soon. microsoft docs does give you an option to download PDF on left bottom corner though. Something to read on the train ride :)
@peymanx4 жыл бұрын
has anyone encounter this error: System.Runtime.InteropServices.SEHException: 'External component has thrown an exception.' ??
@CuriousDrive4 жыл бұрын
What version of VS are you using and do you have .NET core installed on your machine?
@peymanx4 жыл бұрын
@@CuriousDrive Thanks for your response, It was about 'Platform Target', I changed it from 'Any CPU' to 'x86' and it runs perfectly,.now. ❤
@RaviKumar-yj7hu4 жыл бұрын
Can yo do video on .net core identity using db first approach like without migrations
@CuriousDrive4 жыл бұрын
Thanks for the suggestion Ravi. I do have 2 more videos left in this series. that could be one of them. Thanks!!!
@RaviKumar-yj7hu4 жыл бұрын
@@CuriousDrive I am eagerly waiting thank you
@RaviKumar-yj7hu4 жыл бұрын
@@CuriousDrive After the identity complete, register one user with postman or anything.
@sasularaghavendra22504 жыл бұрын
Could you please explain one example, How to use stored procedures in webAPI with entity framework Thanks, Raghavendra
@CuriousDrive4 жыл бұрын
Hello Raghavendra, I have plans to make a video series on ASP.NET Web API for .NET 5 framework. I am going to cover how you can call stored procedure in that series but meanwhile you can take a look at this article. I hope this helps. www.entityframeworktutorial.net/efcore/working-with-stored-procedure-in-ef-core.aspx
@sreenuksr4 жыл бұрын
Nice video. Could you please share the code link. thank you!
@CuriousDrive4 жыл бұрын
Hello Sreenivasa, you can find the code here - github.com/CuriousDrive/BookStores Thanks for watching. Please share with others
@sreenuksr4 жыл бұрын
@@CuriousDrive thank you
@michaelfriebel34004 жыл бұрын
Thanks
@CuriousDrive4 жыл бұрын
Thanks for watching Michael.
@microsoftsimba69903 жыл бұрын
You are Way Ahead from Begineer Perspective
@CuriousDrive2 жыл бұрын
Sorry about that. The beginner videos are coming on the channel this year.
@jackbeyant91164 жыл бұрын
Could you provide me database sql file? thanks a lot!
@CuriousDrive4 жыл бұрын
There you go - github.com/CuriousDrive/BookStores/blob/master/BookStoresWebAPI/Database/Backups/BookStoresDB.sql