public ContainmentDTO Map(Containment containment) { if (containment == null) return null; return Mapper.Map<Containment, ContainmentDTO>(containment); }
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; }