/// <summary> /// Update Floor to db /// </summary> /// <param name="floor"></param> /// <returns></returns> public bool Update(Floor floor) { using (var context = new FloorContext()) { context.Floors.Attach(floor); var entry = context.Entry(floor); entry.State = EntityState.Modified; context.SaveChanges(); return(true); } }
/// <summary> /// Update Floor to db /// </summary> /// <param name="floor"></param> /// <returns></returns> public bool Update(Floor floor) { using (var context = new FloorContext()) { context.Floors.Attach(floor); var entry = context.Entry(floor); entry.State = EntityState.Modified; context.SaveChanges(); //log call _loggingService.Info("Elevator.Infrastructure.Data.Repositories: FloorRepository.Update"); return(true); } }