.Net core web api crud with mysql | c# data access #1

  Рет қаралды 7,446

Ravindra Devrani

Ravindra Devrani

Күн бұрын

dotnet core with mysql
dotnet core web apis with mysql
aspnet core web api crud with mysql
dotnet core web api crud
c# and mysql
dotnet and mysql
📎Source code: github.com/rd0...
.......................................................................................
connect with me:
👉 KZbin: / @ravindradevrani
👉 Twitter: / ravi_devrani
👉 GitHub: github.com/rd003
👉 Medium.com: / ravindradevrani
..........................................
Support my work:
You can buy me a coffee 🍵 : www.buymeacoff...
#aspnetcore #dotnet7api #dotnetmysql

Пікірлер: 27
@ramkrishnamaurya9636
@ramkrishnamaurya9636 7 ай бұрын
getting error => No DbContext was found in assembly 'DotnetMySqlEF.API'. Ensure that you're using the correct assembly and that the type is neither abstract nor generic.
@ali_majaz
@ali_majaz 6 ай бұрын
same, did you find any solution?
@PepTalker98
@PepTalker98 Ай бұрын
Just a question ! What if I forgot to add a model property and apply migration again and it shows that the table exists ! What to do ? SQL Server dosent throws error and Postgres also but in MySQL it shows error .. Can you please suggest what to do ?
@ravindradevrani
@ravindradevrani Ай бұрын
I am not able to understand this line clearly "What if I forgot to add a model property and apply migration again and it shows that the table exists " Are you implying, you are running migration without making any changes to any table. I am sorry , I am not able to understand it and I have never encountered this situation.
@PepTalker98
@PepTalker98 Ай бұрын
@@ravindradevrani i was saying that i created a model and added 3 fields and ran a migration and update database then in that model i want to add 2 more fields and then again when i try to run migration it works fine but when i try to update the database using update database command it shows the table already exists ! This happens with MySql only not with Postgres or Sql Server ! Hope you understood my question!🙋‍♂️
@ravindradevrani
@ravindradevrani Ай бұрын
Yes yes, I have clearly understood it. It's strange situation to me. Sorry, I have no Idea about it. If you delete the database and all the migrations files, and re-run the migration commands, It might fix the error. But it's just a workaround. In the future, if you add more properties to model, you might encounter the same situation (as you have mentioned, it's occurring with my sql database).
@creativeartworld4705
@creativeartworld4705 4 ай бұрын
In project im not getting Program.cs code as it is in your videos
@craigfreeburg5910
@craigfreeburg5910 3 ай бұрын
do you have any information or a video on deploying a project like this? I have my project built pretty much this way, with 2 visual studio projects, but unsure how to compile and deploy this so I can put the files on my hosting to have the api live. thanks!
@ravindradevrani
@ravindradevrani 3 ай бұрын
If you have two projects, 1 api + 1 classi library then just publish it like other single project applications. You can try to deploy it on your macine's iis server. Checkout the video. kzbin.info/www/bejne/oZ_CfIiNhNWAmq8
@craigfreeburg5910
@craigfreeburg5910 3 ай бұрын
@@ravindradevrani Will do. appreciate the reply
@Ashandsax
@Ashandsax 11 ай бұрын
Thank you very much! Excellent video Sir. If I want to make a full stack application replication a travel agent. Do I first need to build an API, and then connect it to a front end, such as Blazor? Or do I start the project as a Blazor server and do all the things you showed in this video in that template? I don't quite understand the difference between .net core web api and Blazor.
@ravindradevrani
@ravindradevrani 11 ай бұрын
If you do not need single page application then you can go with mvc/razor pages app. You will need single hosting for that. You can also make it on blazor server. Where you can host it on a single domain. If you choose blazor webassmebly. Then you have to host api and front end (blazor webassmebly app) on two different domains. Cost is disadvantage here. But infuture if you want to switch from blazor to other front end frameworks (like react, vue, angular) you can change it. You have one more option api+ javascript framework fullstack app. It totally depends on your requirements. Think for a long run. Because you need to maintain it in future.
@sweetysnehith9692
@sweetysnehith9692 8 ай бұрын
Hi Can you please share the any reference of mvc core api project with authorization bearer token concept
@ravindradevrani
@ravindradevrani 8 ай бұрын
You can follow this tutorial kzbin.info/www/bejne/nWO6eYiIhrSVsLM
@sweetysnehith9692
@sweetysnehith9692 7 ай бұрын
@@ravindradevrani thank you 😊
@sweetysnehith9692
@sweetysnehith9692 7 ай бұрын
Hello Can you please share the Sql databases to check it
@ravindradevrani
@ravindradevrani 7 ай бұрын
It follows code first approach.. Download the source code. Delete the folder with name migrations. Run these two commands Add-migration init Update-database
@sweetysnehith9692
@sweetysnehith9692 7 ай бұрын
Hi I'm facing issue like these please help me 'add-migration init' is not recognized as an internal or external command, operable program or batch file.
@Esimaxchannel
@Esimaxchannel 2 ай бұрын
Can you zoom-in a bit
@ravindradevrani
@ravindradevrani 2 ай бұрын
I will keep it in my mind
@Pavan-t4p
@Pavan-t4p Жыл бұрын
Hi sir can yo do project about .net web api
@ravindradevrani
@ravindradevrani Жыл бұрын
What kind of project?
@NotAHomelessGamer
@NotAHomelessGamer Жыл бұрын
@@ravindradevrani If you have the time, I've been trying to find a tutorial that shows either a winforms app or android app that communicates with mySQL through a RESTful web api.
@ravindradevrani
@ravindradevrani Жыл бұрын
@@NotAHomelessGamer its been a long since i have worked in winform. I m totally forgot how it works. And never worked with maui/xamarine. So am not able to make this kind of tutorial.
.net core web api crud with mysql & dapper
48:59
Ravindra Devrani
Рет қаралды 2 М.
Зу-зу Күлпаш 2. Бригадир.
43:03
ASTANATV Movie
Рет қаралды 447 М.
The selfish The Joker was taught a lesson by Officer Rabbit. #funny #supersiblings
00:12
Funny superhero siblings
Рет қаралды 10 МЛН
iPhone or Chocolate??
00:16
Hungry FAM
Рет қаралды 58 МЛН
Tugas Pertemuan 3 | Pemograman Web - Semester 5
1:13:22
Muhammad Thariq
Рет қаралды 2
.NET 7  💥  - Intro to CQRS and MediatR with ASP.NET Core Web Api
1:06:48
Connecting C# To MySQL Using Blazor (Full CRUD Actions)
56:06
IAmTimCorey
Рет қаралды 86 М.
ASP.NET Core Crash Course - C# App in One Hour
1:00:44
freeCodeCamp.org
Рет қаралды 1,6 МЛН
Зу-зу Күлпаш 2. Бригадир.
43:03
ASTANATV Movie
Рет қаралды 447 М.