public static StorageBinLocation FromUnit(StorageUnit unit, int rowIndex, int columnIndex) { return(new StorageBinLocation() { Unit = unit.ToReference(), Location = unit.Location, RowIndex = rowIndex, ColumnIndex = columnIndex }); }
public StorageUnitProfile() { CreateMap <StorageUnit, StorageUnitModel>(); CreateMap <StorageUnitInsertUpdateModel, StorageUnit>() .ForMember( storageUnit => storageUnit.Rows, map => map.MapFrom( source => StorageUnit.FromLayout(source.Rows, source.ColumnsPerRow) )); }