title: When i want don't modified one Attributes,It's not work,question for ef core
body: <p>I don't Want Modified UserPassword when it's null or empty ,<br>I search for long time but it's doesn't work<br>
  Would you give me some advice ?<br></p>
  <pre><code>public async Task&lt;IActionResult&gt; Edit(int ID, [Bind(&quot;UserId,UserPassword,Username,Fullname,Nickname,Sex,Status,Email,Tel,Mobile,Address,Province,City,PostCode,UserType&quot;)] User user)
      {
          if (ID != user.UserId)
          {
              return NotFound();
          }
          if (ModelState.IsValid)
          {
              
                  if (string.IsNullOrEmpty(user.UserPassword))
                  {
                      context.Attach(user);
                      context.Entry(user).Property(&quot;UserPassword&quot;).IsModified = false;
                  }
                  else
                  {
                  user.UserPassword = main.Md5(user.UserPassword);
                  }
                  context.Update(user);
                  await context.SaveChangesAsync();
              
              return RedirectToAction(nameof(Index));
          }
          return View(user);
      }
  </code></pre>
  <p>Here is cshtml
  <a href="https://i.stack.imgur.com/mQwJy.png" rel="nofollow noreferrer">enter image description here</a></p>