internal static void WorkWithFile(Byte[] file)
        {
            //1-2.IEnumerable<Sales>
            IEnumerable <Sales> sales = ParseCsv.ParseResource <Sales>(file, sale =>
            {
                sale.CreatedByUserId = adminGuid;
                sale.CreatedDateTime = DateTime.UtcNow;
            });

            // Check data whether there is a database (manager)
            ValidateData(sales);

            // write to the Sales database

            //3.AutoMapper BLL
            SalesService salesService = new SalesService(mapper);
            var          saleBLL      = MappingService.MappingForBLLEntities <BLL.Sale, BLL.Sales>(salesService, sales);

            //4.AutoMapper DAL
            SaleService saleService = new SaleService(mapper);
            var         saleDAL     = MappingService.MappingForDALEntities <DAL.Sale, BLL.Sale>(saleService, saleBLL);

            // find customers and products by their ID and, if not, create new IDs
            saleDAL = clientService.CheckNameId(saleDAL).Result;
            saleDAL = productService.CheckNameId(saleDAL).Result;

            // write to the sales database from the file
            saleService.Add(saleDAL);
            //SaveChangesWithException(saleService, "заказа");
        }