private void DeleteIgnoredObject(object obj) { _auditLogRepository.DeleteIgnoredDatabaseObject(((IgnoredObjectModel)obj).Id); IgnoredObjects = new ObservableCollection <IgnoredObjectModel>(_auditLogRepository.GetIgnoredDatabaseObjects() .Select(x => new IgnoredObjectModel(x.Id, x.ObjectName, x.ObjectSchema, x.ObjectDatabase, x.IgnoredByTime, x.IgnoredByUser))); }