Difference between ApiController and Controller in ASP NET MVC

preview_player
Показать описание
Difference between ApiController and Controller in ASP NET MVC
-------------
May be you like this
--------------
Our channel:
KnockoutJs Playlist:
Wcf playlist :

Wcf restful playlist :

c# playlist:

google maps playlist:

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

They also run on different stacks, web api can't be cashed

Mo-efyt
Автор

I was waiting for you to run it and show the result, but you didn't.

CAPITAL_LETTERS-kw
Автор

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
welcome to shbcf.ru