private void OnItemClickExecute(EntityButtonWidgetViewModel obj)
 {
     if (DesignMode) return;
     if (_applicationState.SelectedEntityScreen == null) return;
     var si = _applicationState.SelectedEntityScreen.ScreenItems.SingleOrDefault(x => x.Name == Settings.ResourceName);
     var resource = si != null ? _cacheService.GetEntityById(si.EntityId) :
                    Entity.GetNullEntity(_applicationState.SelectedEntityScreen.EntityTypeId);
     OperationRequest<Entity>.Publish(resource, EventTopicNames.EntitySelected, null, null);
 }
        private void OnItemClickExecute(EntityButtonWidgetViewModel obj)
        {
            if (DesignMode)
            {
                return;
            }
            if (_applicationState.SelectedEntityScreen == null)
            {
                return;
            }
            var si       = _applicationState.SelectedEntityScreen.ScreenItems.SingleOrDefault(x => x.Name == Settings.ResourceName);
            var resource = si != null?_cacheService.GetEntityById(si.EntityId) :
                               Entity.GetNullEntity(_applicationState.SelectedEntityScreen.EntityTypeId);

            OperationRequest <Entity> .Publish(resource, EventTopicNames.EntitySelected, null, null);
        }