title: Update only the given values (Entity Framework)
body: <p>I am trying to update the entity only by the values sent to the API dynamically, so each time the client will send to my api different values it will change only the given values.</p>
  <p><strong>This is my entity</strong></p>
  <pre><code>    public class Administrator
      {
          public int Id { get; set; }
          public string Name { get; set; }
          public string Email { get; set; }
          public string Password { get; set; }
          public string Role { get; set; }
          public int Phone { get; set; }
      }
  </code></pre>
  <p><strong>This is my repository:</strong></p>
  <pre><code>public Task&lt;bool&gt; UpdateAdmin(Administrator admin)
          {
              if (admin != null)
              {
                  _context.Admins.Update(admin);
                  Commit();
                  return Task.FromResult(true);
              }
              else
              {
                  return Task.FromResult(false);
              }
          }
  </code></pre>
  <p>Lets say I want to update only the phone number, I send the data with only new phone number but the rest of the properties are changed to null aswell. How can I update only the given ones?</p>
  <p>Thanks</p>