I know that for update a model in EF i must get model then change it then dbContext.SaveChanges()
but sometimes in my Asp.net mvc project , i want update a field in my table and i don't know it 's id and must be get it with where clause.
but i don't want connect twice to database , because in ADO.net i can write:
UPDATE MyTable SET Field3 = "NewValue" WHERE Active = 1
and now i want write a linq to sql for EF that work like that.
Is exist any way for that?
thanks
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…