private ProductBrandDTO Map(tblProductBrand tbl)
 {
     var dto = new ProductBrandDTO
                   {
                       MasterId = tbl.id,
                       DateCreated = tbl.IM_DateCreated,
                       DateLastUpdated = tbl.IM_DateLastUpdated,
                       StatusId = tbl.IM_Status,
                       Name = tbl.name,
                       Code = tbl.code,
                       Description = tbl.description,
                       SupplierMasterId = tbl.SupplierId ?? Guid.Empty
                   };
     return dto;
 }
Пример #2
0
 public ProductBrand Map(ProductBrandDTO dto)
 {
     if (dto == null) return null;
     var productBrand = Mapper.Map<ProductBrandDTO, ProductBrand>(dto);
     productBrand.Supplier = _supplierRepository.GetById(dto.SupplierMasterId);
     return productBrand;
 }