What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 20801 |  Welcome, Guest!   Register  Login
 Home > Blogs > ASP.NET > MVC4 Web API that Supports CRUD Operations ...
Amitkpatel

MVC4 Web API that Supports CRUD Operations

 Blog author: Amitkpatel | Posted on: 6/25/2012 | Category: ASP.NET Blogs | Views: 757 | Status: [Member] | Points: 75 | Alert Moderator   


MCV4 have new feature is WEB API. CRUD stands for "Create, Read, Update, and Delete," which are the four basic database operations. Many HTTP services also model CRUD operations through REST or REST-like APIs.

Action
HTTP method
Relative URI
Get a list of allproducts
GET
/api/customer
Get a product by ID
GET
/api/customer/id
Get a product bycategory
GET
/api/customer?category=category
Create a new product
POST
/api/customer
Update a product
PUT
/api/customer/id
Delete a product
DELETE
/api/customer/id

The four main HTTP methods (GET, PUT, POST, and DELTETE) can be mapped to CRUD operations as follows:
1.      GET retrieves the representation of the resource at a specified URI. GET should have no side effects on the server.
2.      PUT updates a resource at a specified URI. PUT can also be used to create a new resource at a specified URI, if the server allows clients to specify new URIs. For this tutorial, the API will not support creation through PUT.
3.      POST creates a new resource. The server assigns the URI for the new object and returns this URI as part of the response message.
4.      DELETE deletes a resource at a specified URI.




Amit Kumar Patel
http://blog.iquestionanswer.co.in
http://www.iquestionanswer.co.in
Found interesting? Add this to:



 More Blogs from Amitkpatel

     More ...

    About Amit Patel

    Experience:8 year(s)
    Home page:http://www.dotnetchuks.com
    Member since:Friday, June 22, 2012
    Level:Starter
    Status: [Member]
    Biography:I am Amit Patel, I have 8yrs of experiences in Microsoft technologies. I am very much passionate about Web technology. My core skill is ASP.NET, WCF, C#, JQuery and CSS
    >> Write Response - Respond to this post and get points

    More Blogs

    About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
    General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
    Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/22/2013 10:10:25 PM