private SalesmanRouteDTO Map(tblSalemanRoute tbl)
 {
     var dto = new SalesmanRouteDTO
                   {
                       MasterId = tbl.Id,
                       DateCreated = tbl.IM_DateCreated,
                       DateLastUpdated = tbl.IM_DateLastUpdated,
                       StatusId = tbl.IM_Status,
                       DistributorSalesmanMasterId = tbl.SalemanId,
                       RouteMasterId = tbl.RouteId
                   };
     return dto;
 }
 public SalesmanRoute Map(SalesmanRouteDTO dto)
 {
     if (dto == null) return null;
     var salesmanRoute = Mapper.Map<SalesmanRouteDTO, SalesmanRoute>(dto);
     salesmanRoute.Route = _routeRepository.GetById(dto.RouteMasterId);
     return salesmanRoute;
 }