Web API attribute routing constraints



Text version of the video
http://csharp-video-tutorials.blogspot.com/2017/02/web-api-attribute-routing-constraints.html

Slides
http://csharp-video-tutorials.blogspot.com/2017/02/web-api-attribute-routing-constraints_20.html

All ASP .NET Web API Text Articles and Slides
http://csharp-video-tutorials.blogspot.com/2016/09/aspnet-web-api-tutorial-for-beginners.html

All ASP .NET Web API Videos

All Dot Net and SQL Server Tutorials in English
https://www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd

All Dot Net and SQL Server Tutorials in Arabic
https://www.youtube.com/c/KudvenkatArabic/playlists

In this video we will discuss Attribute Routing Constraints in ASP.NET Web API. Let’s understand these constraints with an example.

Consider the following StudentsController.

[RoutePrefix(“api/students”)]
public class StudentsController : ApiController
{
static List[Student] students = new List[Student]()
{
new Student() { Id = 1, Name = “Tom” },
new Student() { Id = 2, Name = “Sam” },
new Student() { Id = 3, Name = “John” }
};

[Route(“{id}”)]
public Student Get(int id)
{
return students.FirstOrDefault(s =] s.Id == id);
}
}

If we navigate to /api/students/1, Get(int id) action method is mapped to the URI and we get the details of the student whose id is 1 as expected.

In addition to retrieving student by Id, we also want to retrieve student by “name”. So let’s add another Get() method as shown below. Notice the name of the parameter is name and it’s type is string.

[RoutePrefix(“api/students”)]
public class StudentsController : ApiController
{
static List[Student] students = new List[Student]()
{
new Student() { Id = 1, Name = “Tom” },
new Student() { Id = 2, Name = “Sam” },
new Student() { Id = 3, Name = “John” }
};

[Route(“{id}”)]
public Student Get(int id)
{
return…

source

[NEW COURSE] ASP.NET MVC 5



My ASP.NET MVC 5 course is now live on Udemy. Get the course with a discount here:

http://bit.ly/298ldEg

You can find my other courses here:

http://programmingwithmosh.com/courses

source

Projetos VS2015 – ASP.NET Web API: Curso – Aprenda Programação .NET #14



Olá desenvolvedor!

Web API na escuta! Câmbio e ligado!

Esse é o assunto da nossa **décima quarta aula** sobre as bases do .NET Framework!

Aqui está a segunda parte desse assunto!!

Vamos lá desenvolvedor! Vamos aprender e evoluir!

———————————————————

Receba conteúdo todo especial se inscrevendo na lista VIP em http://www.comoprogramarmelhor.com.br

A playlist dessa série está em https://www.youtube.com/playlist?list=PLBIZ3dmiYIYlLQA3eceFCy_B4rSfVeYBI

Encontre os fontes das aulas para download em http://comoprogramarmelhor.com.br/codigos-fontes-para-download

Projetos VS2015 – ASP.NET Web API: Curso – Aprenda Programação .NET #14 | Como Programar Melhor

#comoprogramarmelhor

source

Building Single Page App Using ASP.NET Core with Entity Framework Core and AngularJS – Results



Building Single Page App Using ASP.NET Core with Entity Framework Core and AngularJS – Results. Get the complete insight of the book @ http://bit.ly/Rahul-SPA-Core

source

ASP.NET Web API Design Tutorials



ASP.NET Web API Design Tutorials

This course introduces the basics of the ASP.NET Web API. The ASP.NET Web API is a rich, flexible framework for building HTTP based endpoints and client.

ASP.NET Web API is a framework that makes it easy to build HTTP services that reach a broad range of clients, including browsers and mobile devices. ASP.NET Web API is an ideal platform for building RESTful applications on the .NET Framework.

ASP.NET Web API: https://www.asp.net/web-api

ASP.NET Core has built-in support for MVC building Web APIs. Unifying the two frameworks makes it simpler to build apps that include both UI (HTML) and APIs, because now they share the same code base and pipeline.

source

Part 6 – How to upload files in the ASP.NET Web API using Http Client



Visit : http://dotnetawesome.blogspot.com/2015/08/how-to-upload-files-in-aspnet-webapi-using-httpclient.html

source

ASP.NET Web API – Refactoring, Adding Entity Framework, Postman 3b



GitHub: https://github.com/wingman007/Csn.OrmEdd3b

Mind Map: https://mind42.com/public/c693e3bf-60fe-48de-88b9-229e50b82d81

source

Using Context in manager – Create



This Series is about building C# Fullstack Web Applications in ASP.NET using MVC, Web API, the Entity Framework and a MS SQL Database.

In this, the third part of this Series, the focus will be on using the Entity Framework in a ASP.NET MVC web application.
We will focus on how when using the EF, we can persist data in a MSSQL database and later retrieve and manipulate the persisted data and present it in a MVC solution using the twitter bootstrap framework 3.0.

SourceCode can be found here:
https://github.com/EASV/CS2015_PersonAppMVC

Before you take the third part of the course you may wanna look at:
Part 1 C# Basics:

And part 2 MVC Basics:

TutorialsTeacher has a lot of great Material on C# and ASP.NET MVC:
http://www.tutorialsteacher.com/mvc/asp.net-mvc-tutorials

entityframeworktutorial.net has a lot of great Material on EF6.0 that we use in this tutorial:
http://www.entityframeworktutorial.net/

source

Building Secure Web APIs with ASP NET Core



ASP.NET Core is a modern Web framework for building both Web UI and Web APIs. In this talk I’ll show you how you can easily build secure Web APIs for rich browser applications and for native mobile apps.

source

Introducing ASP NET Web API 2



ASP.NET Web API 2 makes it easier than ever to build secure HTTP services that can be used from any client, including browsers and mobile devices. In this video, we’ll show you how you can secure access to your Web APIs using OAuth 2.0 and write portable code to call your Web APIs from native client applications.

source

1 2 3