private CommodityProducerCentreAllocationDTO Map(tblMasterDataAllocation tbl)
 {
     var dto = new CommodityProducerCentreAllocationDTO
                   {
                       MasterId = tbl.Id,
                       DateCreated = tbl.IM_DateCreated,
                       DateLastUpdated = tbl.IM_DateLastUpdated,
                       StatusId = tbl.IM_Status,
                       CommodityProducerId = tbl.EntityAId,
                       CentreId = tbl.EntityBId
                   };
     return dto;
 }
コード例 #2
0
 public MasterDataAllocation Map(CommodityProducerCentreAllocationDTO dto)
 {
     if (dto == null) return null;
     var allocation = Mapper.Map<CommodityProducerCentreAllocationDTO, MasterDataAllocation>(dto);
     allocation.AllocationType = MasterDataAllocationType.CommodityProducerCentreAllocation;
     return allocation;
 }