Usually I\'m using this code
Member member = ctx.Members.Find(id);
member.Name = txtName.Text;
ctx.Entry(member).State = EntityState.Modified;
ctx.SaveChanges();
The EntityState.Modified is useless in your case because the entity your are updating is already tracked by the context as you retrieve it from the context.
You would need it in the following scenario where you don't retrieve your entity from the context :
Member member = new Member({Id=1, Name="member"}) ;
context.Entry(member).State = EntityState.Modified;
context.SaveChanges();
Also, as specified in previous answer, your context sometimes tracks only a limited "view" of the database and therefore you need to init the tracking manually like above.
Microsoft doc