Пример #1
0
 public ContainmentDTO Map(Containment containment)
 {
     if (containment == null) return null;
     return Mapper.Map<Containment, ContainmentDTO>(containment);
 }
Пример #2
0
        public static Containment Map(this tblContainment containment)
        {
            Containment retContainment = new Containment(containment.id)
            {
                ProductPackagingType = containment.tblProductPackagingType.Map(),//_productPackagingTypeRepository.GetById(containment.ProductPackagingType),
                Quantity = containment.Quantity,
                //ProductRef = containment.tblProduct.Map_productRepository.GetById(containment.ReturnableProduct) as ReturnableProduct
                ProductRef = new ProductRef { ProductId = containment.ReturnableProduct },
            };
            retContainment._SetDateCreated(containment.IM_DateCreated);
            retContainment._SetDateLastUpdated(containment.IM_DateLastUpdated);
            retContainment._SetStatus((EntityStatus)containment.IM_Status);

            return retContainment;
        }