Update() and DbSet.Attach() respectively: Person p = new Person(){ Id = 1 } var entity = context.Persons.Update(p); p.Age = 30; Console.
確定! 回上一頁