Part 4: ASP NET Web API - Routing

preview_player
Показать описание
Welcome to my tutorial series on building Web API using ASP NET Web API! In this in-depth dotnet tutorial, we take you through the entire process of creating a robust and scalable API using the latest version of ASP.NET. With a step-by-step approach, net core tutorial, this ASP NET Core tutorial provides you with a solid foundation on C Net Programming, C Sharp Web development, DotNet Backend, Entity Framework, Entity Framework Core and Entity Framework Core.
Рекомендации по теме
Комментарии
Автор

Hi, thanks for the tutorial, clear as water, I've got a question, if one needs to create GET web method, say getProductList, but this is for a report, so a few parameters needs to be send, for example: product category, location, status, initial date and final date. Please explain what will be the best way to do this, thanks.

MarioVillamizar
Автор

Awesome videos. Very easy to follow and truly understand the process. Only one complaint. Which is really not a compliant. The IEnumerable<Product> Get() method should also be a public IHttpActionResult Get() method, which follows the same principles as the rest of your controller methods. Just for consistence. However, it works exactly the same. Awesome!!!!

terrancejones
Автор

@Ripon doe the function name has to start with Get keyword ? I just tried Product and Products and it didn't work.

sandipsubedi
Автор

Nice article with clear description.
Please also update authentication /authorization article using token.

SurajSharma
Автор

How to implement generic repository pattern with unit of work in web API???

anbuanbu
Автор

Thanks Jonas Kaffka for your compliment.

riponus
Автор

thx ripon for this video. It was informative. However, I am just wondering, why don't bloggers/YouTubers are not showing Post/Put/Delete with browser. Everyone shows it with Fiddler only. is it not possible to show all operations in browser?

chintandd
Автор

Your vídeos are very usefull. Thank you ...

JonasKaffka
Автор

But why you put http anotation? Everything work without them. Am i wrong, but that are different approachs for the same thing?

dusanmarkovic
Автор

Dear Mr,

In case I need to use a stored procedure from DB in sql server and this stored procedure has many parameters and many join to many tables and return many fields from many table how to call and use it with WEB API Controller?

Many thanks and best regards,


Example : EF

public virtual DbSet<T_Clubs> T_Clubs { get; set; }
public virtual DbSet<T_Games> T_Games { get; set; }
public virtual DbSet<T_Reservations> T_Reservations { get; set; }


//HOW TO USE THIS WITH WEB API Controller this a stored procedure in DB ?!! PLease advice
public virtual int clubId)
{
var clubIdParameter = clubId.HasValue ?
new ObjectParameter("ClubId", clubId) :
new ObjectParameter("ClubId", typeof(int));

return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetReservationsByClubId", clubIdParameter);
}

//HOW TO USE THIS WITH WEB API Controller this a stored procedure in DB ?!! PLease advice
public virtual GetReservations()
{
return
}


//HOW TO USE THIS WITH WEB API Controller this a stored procedure in DB ?!! PLease advice?

Thank you and best regards

creatortrainer
Автор

"OK so This that way how it is configure-rid" 1:42 :-)

christianprogrammer