public async void Update(City item)
        {
            var cityInDb = await context.Cities.FindAsync(item.Id);

            if (cityInDb != null)
            {
                context.Entry(cityInDb).CurrentValues.SetValues(item);
                context.Entry(cityInDb).State = EntityState.Modified;
            }
        }
Example #2
0
 public void Update(HistoryRecord item)
 {
     context.Entry(item).State = System.Data.Entity.EntityState.Modified;
 }