示例#1
0
 internal static IEnumerable <T> OnPreDelete(IEnumerable <T> entities)
 {
     if (entities == null || PreDelete == null)
     {
         return(entities);
     }
     return(PreDelete
            .GetInvocationList()
            .OfType <EntityProcessor <T> >()
            .Aggregate(entities, (e, processor) => processor(e)));
 }
        public async Task ShowDelete(TItem item)
        {
            Item            = item;
            _mode           = "Delete";
            _isModalVisible = true;
            TitleDialog     = StringLocalizer["DeleteTitle"];
            IconDialog      = "fas fa-trash";
            DialogAction    = StringLocalizer["Delete"];
            await PreDelete.InvokeAsync(item);

            StateHasChanged();
        }