SlideShare a Scribd company logo
Building Rest Services Using
ASP.NET Web API
Brij Bhushan Mishra
http://codewala.net @code_wala https://www.facebook.com/codewala
About Me
• Brij Bhushan Mishra
• 5 times Microsoft MVP - ASP.NET/IIS
• Architect/Consultant/ SME
• Avid Blogger/ Author/ Reviewer
• Speaker at top Conferences including GIDS,
TechEd, C# Corner Conference and many more
• Work closely with various organizations as SME, Content developer, Speaker,
Community Tech Reviewer
• http://codewala.net
• @code_wala
• https://www.facebook.com/codewala
http://codewala.net @code_wala https://www.facebook.com/codewala
What is REST ?
http://codewala.net @code_wala https://www.facebook.com/codewala
Everybody needs REST?
Representational State TransferRepresentational State Transfer
http://codewala.net @code_wala https://www.facebook.com/codewala
Why are we talking about Rest?
• To Understand it, let’s talk about WCF and its working
SOAPSOAPSOAP
http://codewala.net @code_wala https://www.facebook.com/codewala
What is Rest?
• Rest is an Architectural Style
Kalinga Architecture
MughalArchitecture
http://codewala.net @code_wala https://www.facebook.com/codewala
Rest Constraints
• Client Server
• Stateless server
• Cacheable
• Uniform Interface
• Layered System
• Code on Demand
http://codewala.net @code_wala https://www.facebook.com/codewala
Client Server
Request
Response
http://codewala.net @code_wala https://www.facebook.com/codewala
Stateless Sever
Request
Response
Request
Response
No State
Preserved
http://codewala.net @code_wala https://www.facebook.com/codewala
Cacheable
Request
Response
http://codewala.net @code_wala https://www.facebook.com/codewala
Request
Response
C
a
c
h
e
Uniform Interface
• Identification of a resource
• Each resource should be identified by an Id (api/books/{id})
• Manipulation of resources through representations
• Same representations should be sent back as are received via API
• Uses the standard HTTP verbs for the operation
http://codewala.net @code_wala https://www.facebook.com/codewala
Layered System
Load BalancerProxy Server
http://codewala.net @code_wala https://www.facebook.com/codewala
Why REST?
• Uses HTTP. Less Overhead and lightweight
• Content negotiation
• JSON vs XML
• Any Data from Any Where
http://codewala.net @code_wala https://www.facebook.com/codewala
What is ASP.NET Web API?
ASP.NET Web API is framework that enables to write REST based
services.
http://codewala.net @code_wala https://www.facebook.com/codewala
HTTP Verbs
• GET (Reading the resource)
• POST (Create a resource)
• PUT (Update a resource)
• DELETE (Delete a resource)
• PATCH (Update a resource)
http://codewala.net @code_wala https://www.facebook.com/codewala
Key Characteristics – Defining a Resource
• Collection or single
../api/bookstore/books or /api/bookstore/books/{id}
• Noun (not a verb)
• Navigation (for associated items)
• In Web API, Noun is typically a controller
http://codewala.net @code_wala https://www.facebook.com/codewala
Earlier versions of ASP.NET
http://codewala.net @code_wala https://www.facebook.com/codewala
ASP.NET Core 1.0
http://codewala.net @code_wala https://www.facebook.com/codewala
Postman – Tool for Testing Web API
http://codewala.net @code_wala https://www.facebook.com/codewala
Lets Build our First ASP.NET Web API
application
http://codewala.net @code_wala https://www.facebook.com/codewala
Content Negotiation
http://codewala.net @code_wala https://www.facebook.com/codewala
What we covered today
• What is not REST 
• REST Constraints
• What is ASP.NET Web API
• HTTP Verbs
• ASP.NET Core ( MVC = MVC + Web API)
• POSTMAN
• Demo.. Demo..
http://codewala.net @code_wala https://www.facebook.com/codewala
Thank You
http://codewala.net @code_wala https://www.facebook.com/codewala
http://codewala.net
@code_wala
https://www.facebook.com/codewala
brij.mishra@outlook.com
http://bit.ly/1OTSgZ8
Ad

Recommended

Building Modern Web Applications with ASP.NET5
Building Modern Web Applications with ASP.NET5
Brij Mishra
 
10 tips to make your ASP.NET Apps Faster
10 tips to make your ASP.NET Apps Faster
Brij Mishra
 
Getting Started with ASP.NET 5
Getting Started with ASP.NET 5
Brij Mishra
 
ITT Flisol 2013
ITT Flisol 2013
Domingo Suarez Torres
 
ASP.NET MVC 4
ASP.NET MVC 4
Danijel Malik
 
ASP.NET MVC 4 Overview
ASP.NET MVC 4 Overview
Gunnar Peipman
 
A Gentle Introduction to Blazor
A Gentle Introduction to Blazor
Jose Javier Columbie
 
Host, deploy & scale Blazor Server Apps
Host, deploy & scale Blazor Server Apps
Jose Javier Columbie
 
TDD a REST API With Node.js and MongoDB
TDD a REST API With Node.js and MongoDB
Valeri Karpov
 
Web Application Frameworks (WAF)
Web Application Frameworks (WAF)
Ako Kaman
 
ASP.NET Brief History
ASP.NET Brief History
Sudhakar Sharma
 
SGCE 2012 Lightning Talk-Single Page Interface
SGCE 2012 Lightning Talk-Single Page Interface
Domingo Suarez Torres
 
Improving Perceived Page Performance with ASP.NET Web API and AJAX
Improving Perceived Page Performance with ASP.NET Web API and AJAX
Chris Bohatka
 
Azure Serverless Conf
Azure Serverless Conf
Jose Javier Columbie
 
Real World Rails Deployment
Real World Rails Deployment
Alan Hecht
 
Building solutions with the SharePoint Framework - deep-dive
Building solutions with the SharePoint Framework - deep-dive
Waldek Mastykarz
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVC
Sirwan Afifi
 
Flask introduction
Flask introduction
Hamid Feizabadi
 
Angular4 kickstart
Angular4 kickstart
Foyzul Karim
 
Building solutions with the SharePoint Framework - introduction
Building solutions with the SharePoint Framework - introduction
Waldek Mastykarz
 
Evolution / History of ASP.NET
Evolution / History of ASP.NET
Anoop Kumar Sharma
 
Lap Around ASP.NET MVC 5
Lap Around ASP.NET MVC 5
Lohith Goudagere Nagaraj
 
Web technologies practical guide
Web technologies practical guide
samir azazy
 
Mvc razor and working with data
Mvc razor and working with data
Vladislav Hadzhiyski
 
Javascript & Jquery
Javascript & Jquery
Gurpreet singh
 
Signal r azurepresentation
Signal r azurepresentation
Justin Wendlandt
 
Using Chat Automation - ChatOps
Using Chat Automation - ChatOps
Jaap Brasser
 
Introduction to ASP.NET MVC 1.0
Introduction to ASP.NET MVC 1.0
Shiju Varghese
 
Sinergija2012 - Developing REST API for Windows Azure with ASP.NET Web API
Sinergija2012 - Developing REST API for Windows Azure with ASP.NET Web API
Radenko Zec
 
Create Salesforce online IDE in 30 minutes
Create Salesforce online IDE in 30 minutes
Jitendra Zaa
 

More Related Content

What's hot (20)

TDD a REST API With Node.js and MongoDB
TDD a REST API With Node.js and MongoDB
Valeri Karpov
 
Web Application Frameworks (WAF)
Web Application Frameworks (WAF)
Ako Kaman
 
ASP.NET Brief History
ASP.NET Brief History
Sudhakar Sharma
 
SGCE 2012 Lightning Talk-Single Page Interface
SGCE 2012 Lightning Talk-Single Page Interface
Domingo Suarez Torres
 
Improving Perceived Page Performance with ASP.NET Web API and AJAX
Improving Perceived Page Performance with ASP.NET Web API and AJAX
Chris Bohatka
 
Azure Serverless Conf
Azure Serverless Conf
Jose Javier Columbie
 
Real World Rails Deployment
Real World Rails Deployment
Alan Hecht
 
Building solutions with the SharePoint Framework - deep-dive
Building solutions with the SharePoint Framework - deep-dive
Waldek Mastykarz
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVC
Sirwan Afifi
 
Flask introduction
Flask introduction
Hamid Feizabadi
 
Angular4 kickstart
Angular4 kickstart
Foyzul Karim
 
Building solutions with the SharePoint Framework - introduction
Building solutions with the SharePoint Framework - introduction
Waldek Mastykarz
 
Evolution / History of ASP.NET
Evolution / History of ASP.NET
Anoop Kumar Sharma
 
Lap Around ASP.NET MVC 5
Lap Around ASP.NET MVC 5
Lohith Goudagere Nagaraj
 
Web technologies practical guide
Web technologies practical guide
samir azazy
 
Mvc razor and working with data
Mvc razor and working with data
Vladislav Hadzhiyski
 
Javascript & Jquery
Javascript & Jquery
Gurpreet singh
 
Signal r azurepresentation
Signal r azurepresentation
Justin Wendlandt
 
Using Chat Automation - ChatOps
Using Chat Automation - ChatOps
Jaap Brasser
 
Introduction to ASP.NET MVC 1.0
Introduction to ASP.NET MVC 1.0
Shiju Varghese
 
TDD a REST API With Node.js and MongoDB
TDD a REST API With Node.js and MongoDB
Valeri Karpov
 
Web Application Frameworks (WAF)
Web Application Frameworks (WAF)
Ako Kaman
 
SGCE 2012 Lightning Talk-Single Page Interface
SGCE 2012 Lightning Talk-Single Page Interface
Domingo Suarez Torres
 
Improving Perceived Page Performance with ASP.NET Web API and AJAX
Improving Perceived Page Performance with ASP.NET Web API and AJAX
Chris Bohatka
 
Real World Rails Deployment
Real World Rails Deployment
Alan Hecht
 
Building solutions with the SharePoint Framework - deep-dive
Building solutions with the SharePoint Framework - deep-dive
Waldek Mastykarz
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVC
Sirwan Afifi
 
Angular4 kickstart
Angular4 kickstart
Foyzul Karim
 
Building solutions with the SharePoint Framework - introduction
Building solutions with the SharePoint Framework - introduction
Waldek Mastykarz
 
Evolution / History of ASP.NET
Evolution / History of ASP.NET
Anoop Kumar Sharma
 
Web technologies practical guide
Web technologies practical guide
samir azazy
 
Signal r azurepresentation
Signal r azurepresentation
Justin Wendlandt
 
Using Chat Automation - ChatOps
Using Chat Automation - ChatOps
Jaap Brasser
 
Introduction to ASP.NET MVC 1.0
Introduction to ASP.NET MVC 1.0
Shiju Varghese
 

Similar to Building rest services using aspnetwebapi (20)

Sinergija2012 - Developing REST API for Windows Azure with ASP.NET Web API
Sinergija2012 - Developing REST API for Windows Azure with ASP.NET Web API
Radenko Zec
 
Create Salesforce online IDE in 30 minutes
Create Salesforce online IDE in 30 minutes
Jitendra Zaa
 
Building Software Backend (Web API)
Building Software Backend (Web API)
Alexander Goida
 
Build Modern Web Apps Using ASP.NET Web API and AngularJS
Build Modern Web Apps Using ASP.NET Web API and AngularJS
Taiseer Joudeh
 
Restful Integration with WSO2 ESB
Restful Integration with WSO2 ESB
WSO2
 
Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...
Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...
Callon Campbell
 
Php reports sumit
Php reports sumit
Sumit Biswas
 
Introduction to Google APIs
Introduction to Google APIs
Siva Arunachalam
 
Advanced Web Development in PHP - Understanding REST API
Advanced Web Development in PHP - Understanding REST API
Rasan Samarasinghe
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web api
Tiago Knoch
 
RESTFul Tools For Lazy Experts - CFSummit 2016
RESTFul Tools For Lazy Experts - CFSummit 2016
Ortus Solutions, Corp
 
Rest ful tools for lazy experts
Rest ful tools for lazy experts
ColdFusionConference
 
Azure Functions Real World Examples
Azure Functions Real World Examples
Yochay Kiriaty
 
Webinar: Embracing REST APIs through APPSeCONNECT
Webinar: Embracing REST APIs through APPSeCONNECT
APPSeCONNECT
 
Deploying and Managing PowerPivot for SharePoint
Deploying and Managing PowerPivot for SharePoint
Denny Lee
 
REST and ASP.NET Web API (Tunisia)
REST and ASP.NET Web API (Tunisia)
Jef Claes
 
Getting Started with WordPress JSON REST API
Getting Started with WordPress JSON REST API
Hishikawa Takuro
 
Crafting APIs
Crafting APIs
Tatiana Al-Chueyr
 
O365Con18 - Hybrid SharePoint Deep Dive - Thomas Vochten
O365Con18 - Hybrid SharePoint Deep Dive - Thomas Vochten
NCCOMMS
 
Connecting to Data from Windows Phone 8
Connecting to Data from Windows Phone 8
Woodruff Solutions LLC
 
Sinergija2012 - Developing REST API for Windows Azure with ASP.NET Web API
Sinergija2012 - Developing REST API for Windows Azure with ASP.NET Web API
Radenko Zec
 
Create Salesforce online IDE in 30 minutes
Create Salesforce online IDE in 30 minutes
Jitendra Zaa
 
Building Software Backend (Web API)
Building Software Backend (Web API)
Alexander Goida
 
Build Modern Web Apps Using ASP.NET Web API and AngularJS
Build Modern Web Apps Using ASP.NET Web API and AngularJS
Taiseer Joudeh
 
Restful Integration with WSO2 ESB
Restful Integration with WSO2 ESB
WSO2
 
Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...
Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...
Callon Campbell
 
Introduction to Google APIs
Introduction to Google APIs
Siva Arunachalam
 
Advanced Web Development in PHP - Understanding REST API
Advanced Web Development in PHP - Understanding REST API
Rasan Samarasinghe
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web api
Tiago Knoch
 
RESTFul Tools For Lazy Experts - CFSummit 2016
RESTFul Tools For Lazy Experts - CFSummit 2016
Ortus Solutions, Corp
 
Azure Functions Real World Examples
Azure Functions Real World Examples
Yochay Kiriaty
 
Webinar: Embracing REST APIs through APPSeCONNECT
Webinar: Embracing REST APIs through APPSeCONNECT
APPSeCONNECT
 
Deploying and Managing PowerPivot for SharePoint
Deploying and Managing PowerPivot for SharePoint
Denny Lee
 
REST and ASP.NET Web API (Tunisia)
REST and ASP.NET Web API (Tunisia)
Jef Claes
 
Getting Started with WordPress JSON REST API
Getting Started with WordPress JSON REST API
Hishikawa Takuro
 
O365Con18 - Hybrid SharePoint Deep Dive - Thomas Vochten
O365Con18 - Hybrid SharePoint Deep Dive - Thomas Vochten
NCCOMMS
 
Connecting to Data from Windows Phone 8
Connecting to Data from Windows Phone 8
Woodruff Solutions LLC
 
Ad

Recently uploaded (20)

Rierino Commerce Platform - CMS Solution
Rierino Commerce Platform - CMS Solution
Rierino
 
Looking for a BIRT Report Alternative Here’s Why Helical Insight Stands Out.pdf
Looking for a BIRT Report Alternative Here’s Why Helical Insight Stands Out.pdf
Varsha Nayak
 
Application Modernization with Choreo - The AI-Native Internal Developer Plat...
Application Modernization with Choreo - The AI-Native Internal Developer Plat...
WSO2
 
Microsoft Business-230T01A-ENU-PowerPoint_01.pptx
Microsoft Business-230T01A-ENU-PowerPoint_01.pptx
soulamaabdoulaye128
 
Open Source Software Development Methods
Open Source Software Development Methods
VICTOR MAESTRE RAMIREZ
 
What is data visualization and how data visualization tool can help.pptx
What is data visualization and how data visualization tool can help.pptx
Varsha Nayak
 
Milwaukee Marketo User Group June 2025 - Optimize and Enhance Efficiency - Sm...
Milwaukee Marketo User Group June 2025 - Optimize and Enhance Efficiency - Sm...
BradBedford3
 
Folding Cheat Sheet # 9 - List Unfolding 𝑢𝑛𝑓𝑜𝑙𝑑 as the Computational Dual of ...
Folding Cheat Sheet # 9 - List Unfolding 𝑢𝑛𝑓𝑜𝑙𝑑 as the Computational Dual of ...
Philip Schwarz
 
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
Hassan Abid
 
Shell Skill Tree - LabEx Certification (LabEx)
Shell Skill Tree - LabEx Certification (LabEx)
VICTOR MAESTRE RAMIREZ
 
Smart Financial Solutions: Money Lender Software, Daily Pigmy & Personal Loan...
Smart Financial Solutions: Money Lender Software, Daily Pigmy & Personal Loan...
Intelli grow
 
FME as an Orchestration Tool - Peak of Data & AI 2025
FME as an Orchestration Tool - Peak of Data & AI 2025
Safe Software
 
Women in Tech: Marketo Engage User Group - June 2025 - AJO with AWS
Women in Tech: Marketo Engage User Group - June 2025 - AJO with AWS
BradBedford3
 
Code and No-Code Journeys: The Coverage Overlook
Code and No-Code Journeys: The Coverage Overlook
Applitools
 
Who will create the languages of the future?
Who will create the languages of the future?
Jordi Cabot
 
dp-700 exam questions sample docume .pdf
dp-700 exam questions sample docume .pdf
pravkumarbiz
 
Wondershare PDFelement Pro 11.4.20.3548 Crack Free Download
Wondershare PDFelement Pro 11.4.20.3548 Crack Free Download
Puppy jhon
 
Integrating Survey123 and R&H Data Using FME
Integrating Survey123 and R&H Data Using FME
Safe Software
 
Async-ronizing Success at Wix - Patterns for Seamless Microservices - Devoxx ...
Async-ronizing Success at Wix - Patterns for Seamless Microservices - Devoxx ...
Natan Silnitsky
 
Decipher SEO Solutions for your startup needs.
Decipher SEO Solutions for your startup needs.
mathai2
 
Rierino Commerce Platform - CMS Solution
Rierino Commerce Platform - CMS Solution
Rierino
 
Looking for a BIRT Report Alternative Here’s Why Helical Insight Stands Out.pdf
Looking for a BIRT Report Alternative Here’s Why Helical Insight Stands Out.pdf
Varsha Nayak
 
Application Modernization with Choreo - The AI-Native Internal Developer Plat...
Application Modernization with Choreo - The AI-Native Internal Developer Plat...
WSO2
 
Microsoft Business-230T01A-ENU-PowerPoint_01.pptx
Microsoft Business-230T01A-ENU-PowerPoint_01.pptx
soulamaabdoulaye128
 
Open Source Software Development Methods
Open Source Software Development Methods
VICTOR MAESTRE RAMIREZ
 
What is data visualization and how data visualization tool can help.pptx
What is data visualization and how data visualization tool can help.pptx
Varsha Nayak
 
Milwaukee Marketo User Group June 2025 - Optimize and Enhance Efficiency - Sm...
Milwaukee Marketo User Group June 2025 - Optimize and Enhance Efficiency - Sm...
BradBedford3
 
Folding Cheat Sheet # 9 - List Unfolding 𝑢𝑛𝑓𝑜𝑙𝑑 as the Computational Dual of ...
Folding Cheat Sheet # 9 - List Unfolding 𝑢𝑛𝑓𝑜𝑙𝑑 as the Computational Dual of ...
Philip Schwarz
 
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
Hassan Abid
 
Shell Skill Tree - LabEx Certification (LabEx)
Shell Skill Tree - LabEx Certification (LabEx)
VICTOR MAESTRE RAMIREZ
 
Smart Financial Solutions: Money Lender Software, Daily Pigmy & Personal Loan...
Smart Financial Solutions: Money Lender Software, Daily Pigmy & Personal Loan...
Intelli grow
 
FME as an Orchestration Tool - Peak of Data & AI 2025
FME as an Orchestration Tool - Peak of Data & AI 2025
Safe Software
 
Women in Tech: Marketo Engage User Group - June 2025 - AJO with AWS
Women in Tech: Marketo Engage User Group - June 2025 - AJO with AWS
BradBedford3
 
Code and No-Code Journeys: The Coverage Overlook
Code and No-Code Journeys: The Coverage Overlook
Applitools
 
Who will create the languages of the future?
Who will create the languages of the future?
Jordi Cabot
 
dp-700 exam questions sample docume .pdf
dp-700 exam questions sample docume .pdf
pravkumarbiz
 
Wondershare PDFelement Pro 11.4.20.3548 Crack Free Download
Wondershare PDFelement Pro 11.4.20.3548 Crack Free Download
Puppy jhon
 
Integrating Survey123 and R&H Data Using FME
Integrating Survey123 and R&H Data Using FME
Safe Software
 
Async-ronizing Success at Wix - Patterns for Seamless Microservices - Devoxx ...
Async-ronizing Success at Wix - Patterns for Seamless Microservices - Devoxx ...
Natan Silnitsky
 
Decipher SEO Solutions for your startup needs.
Decipher SEO Solutions for your startup needs.
mathai2
 
Ad

Building rest services using aspnetwebapi

  • 1. Building Rest Services Using ASP.NET Web API Brij Bhushan Mishra http://codewala.net @code_wala https://www.facebook.com/codewala
  • 2. About Me • Brij Bhushan Mishra • 5 times Microsoft MVP - ASP.NET/IIS • Architect/Consultant/ SME • Avid Blogger/ Author/ Reviewer • Speaker at top Conferences including GIDS, TechEd, C# Corner Conference and many more • Work closely with various organizations as SME, Content developer, Speaker, Community Tech Reviewer • http://codewala.net • @code_wala • https://www.facebook.com/codewala http://codewala.net @code_wala https://www.facebook.com/codewala
  • 3. What is REST ? http://codewala.net @code_wala https://www.facebook.com/codewala
  • 4. Everybody needs REST? Representational State TransferRepresentational State Transfer http://codewala.net @code_wala https://www.facebook.com/codewala
  • 5. Why are we talking about Rest? • To Understand it, let’s talk about WCF and its working SOAPSOAPSOAP http://codewala.net @code_wala https://www.facebook.com/codewala
  • 6. What is Rest? • Rest is an Architectural Style Kalinga Architecture MughalArchitecture http://codewala.net @code_wala https://www.facebook.com/codewala
  • 7. Rest Constraints • Client Server • Stateless server • Cacheable • Uniform Interface • Layered System • Code on Demand http://codewala.net @code_wala https://www.facebook.com/codewala
  • 8. Client Server Request Response http://codewala.net @code_wala https://www.facebook.com/codewala
  • 11. Uniform Interface • Identification of a resource • Each resource should be identified by an Id (api/books/{id}) • Manipulation of resources through representations • Same representations should be sent back as are received via API • Uses the standard HTTP verbs for the operation http://codewala.net @code_wala https://www.facebook.com/codewala
  • 12. Layered System Load BalancerProxy Server http://codewala.net @code_wala https://www.facebook.com/codewala
  • 13. Why REST? • Uses HTTP. Less Overhead and lightweight • Content negotiation • JSON vs XML • Any Data from Any Where http://codewala.net @code_wala https://www.facebook.com/codewala
  • 14. What is ASP.NET Web API? ASP.NET Web API is framework that enables to write REST based services. http://codewala.net @code_wala https://www.facebook.com/codewala
  • 15. HTTP Verbs • GET (Reading the resource) • POST (Create a resource) • PUT (Update a resource) • DELETE (Delete a resource) • PATCH (Update a resource) http://codewala.net @code_wala https://www.facebook.com/codewala
  • 16. Key Characteristics – Defining a Resource • Collection or single ../api/bookstore/books or /api/bookstore/books/{id} • Noun (not a verb) • Navigation (for associated items) • In Web API, Noun is typically a controller http://codewala.net @code_wala https://www.facebook.com/codewala
  • 17. Earlier versions of ASP.NET http://codewala.net @code_wala https://www.facebook.com/codewala
  • 18. ASP.NET Core 1.0 http://codewala.net @code_wala https://www.facebook.com/codewala
  • 19. Postman – Tool for Testing Web API http://codewala.net @code_wala https://www.facebook.com/codewala
  • 20. Lets Build our First ASP.NET Web API application http://codewala.net @code_wala https://www.facebook.com/codewala
  • 21. Content Negotiation http://codewala.net @code_wala https://www.facebook.com/codewala
  • 22. What we covered today • What is not REST  • REST Constraints • What is ASP.NET Web API • HTTP Verbs • ASP.NET Core ( MVC = MVC + Web API) • POSTMAN • Demo.. Demo.. http://codewala.net @code_wala https://www.facebook.com/codewala
  • 23. Thank You http://codewala.net @code_wala https://www.facebook.com/codewala http://codewala.net @code_wala https://www.facebook.com/codewala [email protected] http://bit.ly/1OTSgZ8