private PartItem BuildPartItem(CatalogImportItem importItem) { var item = PartItemFactory.BuildFrom(importItem); item.ImportIdentificatorId = _importIdentificator.Id; return(item); }
public PartItem BuildFrom(CatalogImportItem item) { var analogs = String.Join(" ", item.Analogs.Select(a => a.Replace(" ", ""))); var partItem = new PartItem() { Balance = item.Balance, Brand = item.Brand, Commentary = item.Commentary, Name = item.Name, Price = item.Price, PartNumber = item.PartNumber, StammedPartNumber = Stammer.Stamm(item.PartNumber), SourceArgument = item.SourceArgument, Analogs = analogs }; partItem.SearchString = IndexFormatter.GetIndex(partItem); return(partItem); }