ASP.NET Core 2.1 Web API with SQL Server

preview_player
Показать описание
This demo discusses creating a WebAPI service in Visual Studio 2017 with ASP.NET Core 2.1 based on a health domain with ailment, medication and patient entities. Once the API is created, I show how to access the server from a simple HTML page using jQuery. CORS needs to be enabled so that it works from jQuery. Eventually, I show how to use Postman to retrieve, add, update and delete data.

Рекомендации по теме
Комментарии
Автор

Followed this tutorial step by step and I must say this is the best ever tutorial i came across regarding Creating Web API project from the scratch. Took me 5 hours to write all the code and it went smoothly as it seems in the video.
Thank you very much, I will subscribe to your channel right now.

muhammadwaqasiqbal
Автор

Je suis vraiment impressionné par votre approche claire et rigoureuse. Excellente intro.
Merci beaucoup Medhat.

rogerleclerc
Автор

Great job explaining the code in detail, not just using some coding buzzwords and moving to the next step. Having the final code in github also is brilliant.

tennisbruce
Автор

This is what I was looking for. A crisp and clear understanding. Thank you!!

pruthviavula
Автор

Excellent tutorial, exactly what i was looking for! Keep up the good work!

sameershaikh-ksjg
Автор

Nothing words to say you thanks. Outclass video. Just Saluting you dear for this great effort.

bhattisa
Автор

Excellent job! So much valuable information. Thank you!

isaacsanchez
Автор

Thanks for an excellent guide. I had previously abandoned .NET in favour of Python and node. However, I need to develop a website that runs robustly on IIS as my client does not trust his internet connection. This has been a big help.

iancarr
Автор

Thanks so much for this, very clear and concise explanation!

stavvers
Автор

pure information, very nice tutorial.. thank you for everything.

CoskunCaner
Автор

I'm Currently at 21:08 and just worked through a few errors creating the controller. (I am on Core 2.2 which could be part of the reason)
Error 1:"There was an error running the selected code generator: 'No parameterless constructor defined for this object'."
Solution - This error message was misleading, I simply forgot a comma in my connectionstring in the appsettings.json file. My guess is it couldn't properly connect to the database.
Error 2: "the entity type requires a primary key"
Solution - Making my primary key in the Models files public.

SSmithYT
Автор

Sir i have do the same practice with your codding, all is well but i am facing a problem in client side google chrome browser when i call this app get patient data is not showing upon button click although i have pasted jquery code in html page and its lib files also. Please guide me. API is work when i run this server side code. Please help me. where is the problem

aamirsattar
Автор

How can i add multiple AddDbContext in Startup -> ConfigureServices and 2 Controllers which is getting data from difference database in SQLServer?

hourthy
Автор

Hello sir, Great video. I would just like to ask you how can we update the Foreign Key's value in the database using a PUT method. For example I have Buyer Class and Apartments Class, each Buyer has several apartments. So in the database it created a BuyerID for each apartment as a foreign key but I don't know how to modify it. Any Help?
Best Regards,
Mahdi Jaber

mahdijaber
Автор

thanks for informations for tutorial. is nice for beginner

dhanisuhendra
Автор

Tks so much, so when do you come out a new video?

binzigo
Автор

Thanks for the tutorial! But how do I proceed if I have an existing database query?

gabronoyoutube
Автор

muchas gracias, por el video, que pasos tego que hacer para conectarme a la base de datos, muchas gracias

sandrocodigo
Автор

I used postgresql instead of sql. After using dummyData, my ailment table inside postgresql has null values.
"Cold" Null
"Flu" Null
"Head Ache" 3
"Tummy Pain" 3
Is this ok? I used your github code

veloteksedimoi
Автор

Such easy to understand. Sir, could you do a video how to publish this web API in IIS using real online server. I've tried mine but when publish to IIS, i cannot access the API. But in localhost, i successfully access it. even i tried with postman, its work. thank you sir.

meetgurl