i would like to update an existing item in a sql database using linq.
i have tried with this.
public void UpdateFoodDrinkTobacco(int id, string preservationTechniqueCodes, bool isHomogenised)
{
var item = (from item in _db.FoodDrinkAndTobacco
where item.id equals id
select item.isHomogenised);
item = isHomogenised;
_db.SubmitChanges();
}
but this is not working for me.
Hope some of you have a suggestion on how to do this.