Answer the question
In order to leave comments, you need to log in
Why can't update one field in EF?
There is such a model:
public class Phone
{
public int Id { get; set; }
public string Name { get; set; }
public string Company { get; set; }
public int Price { get; set; }
}
Phone Phone = new Phone { Id = 2};
this.Db.Entry(Phone).Property<int>("Price").CurrentValue = 666;
await this.Db.SaveChangesAsync();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question