December 2019
Intermediate to advanced
510 pages
11h 33m
English
Put actions are used to replace a resource with another one. Therefore, the client must add the whole entity in the body payload of the request. If our entity is a complex object, keeping the entire entity in memory may cause performance issues. It is possible to avoid these problems by implementing a Patch action instead. The Patch action usually modifies an existing resource without replacing it, therefore you are able to specify only one the field you want to update. Let's see how we can perform this kind of action in ASP.NET Core.
First of all, let's add a new field to our Order.cs class:
using System;using System.Collections.Generic;namespace SampleAPI.Models { public class Order { public Guid Id { get; set; } public ...
Read now
Unlock full access