Skip to content

AdnanSalah84/WebAPI-With-ASPNET-Core-Sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebAPI-With-ASPNET-Core-Sample

This is a sample of Web API with ASP.NET Core 1.0

Getting started

  • Clone or Download this repository.
  • If you have Visual Studio 2015 then open ASPNet_WebAPI.sln in Visual Studio 2015.
  • Run dotnet ef database update in package manager console.
  • Press F5 to run the application or run the individual application on IIS Express in visual studio 2015.
  • Download "Postman" App for free - https://www.getpostman.com/apps

Postman is a REST Client for Testing Web API. Hope this will help you.

See the examples here:

Get All Students

http://localhost:47565/api/student

postman_get

Get a Student By ID

http://localhost:47565/api/student/1

postman_getid

Post A Student

http://localhost:47565/api/student

  {
    "firstName": "Barack",
    "lastName": "Obama",
    "gender": "Male",
    "age": 55
  },

postman_post

Put A Student By ID

http://localhost:47565/api/student/5

  {
    "studentId": 5,
    "firstName": "Donald",
    "lastName": "Trump",
    "gender": "Male",
    "age": 70
  },

postman_put

Delete A Student By ID

http://localhost:47565/api/student/5

postman_delete

About

This is a sample of Web API with ASP.NET Core 1.0

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages