I have an entity User in WebApi project,
public class User
{
public string UserId { get; set; }
[Required]
public string FirstName { get; set; }
[Required]
public string LastName { get; set; }
}
Same entity has been used for POST and PATCH actions. FirstName and LastName fields are mandatory for POST method but the same is not mandatory for PATCH action.
So, could not use the same entity for these actions, is there any other option to use same entity instead of creating new entity for Patch action?
Thanks in advance!