0

I have an entity with private setters and want to use JsonPatchDocument to create my HTTP patch route. My entity has private setters because I use the constructor to fill these fields; removing it is not an option here.

Is there any way to do it?

public class MyEntity {
  public MyEntity(string firstName, string lastName) {
      FirstName = firstName;
      LastName = lastName;
  } 

  public string FirstName {get; private set;}
  public string LastName {get; private set;}
}
flvrm92
  • 33
  • 1
  • 7

0 Answers0