public virtual async Task <IActionResult> ExportXlsx()
        {
            if (!await _permissionService.AuthorizeAsync(StandardPermissionProvider.ManageManufacturers))
            {
                return(AccessDeniedView());
            }

            try
            {
                var bytes = await _exportManager.ExportManufacturersToXlsxAsync((await _manufacturerService.GetAllManufacturersAsync(showHidden: true)).Where(p => !p.Deleted));

                return(File(bytes, MimeTypes.TextXlsx, "manufacturers.xlsx"));
            }
            catch (Exception exc)
            {
                await _notificationService.ErrorNotificationAsync(exc);

                return(RedirectToAction("List"));
            }
        }
        public async Task CanExportManufacturersXlsx()
        {
            var manufacturers = await _manufacturerService.GetAllManufacturersAsync();

            var excelData = await _exportManager.ExportManufacturersToXlsxAsync(manufacturers);

            var worksheet = GetWorksheets(excelData);
            var manager   = GetPropertyManager <Manufacturer>(worksheet);

            manager.ReadFromXlsx(worksheet, 2);

            var manufacturer = manufacturers.First();

            var ignore = new List <string> {
                "Picture", "EntityCacheKey", "PictureId", "SubjectToAcl", "LimitedToStores", "Deleted", "CreatedOnUtc", "UpdatedOnUtc", "AppliedDiscounts", "DiscountManufacturerMappings"
            };

            AreAllObjectPropertiesPresent(manufacturer, manager, ignore.ToArray());
            PropertiesShouldEqual(manufacturer, manager, new Dictionary <string, string>());

            manager.GetProperties.First(p => p.PropertyName == "Picture").PropertyValue.Should().NotBeNull();
        }