public void DeleteRoom(Room r) { using (var ctx = DataContext.Instance()) { var rep = ctx.GetRepository<Room>(); r.Enabled=false; rep.Update(r); } }