Exemplo n.º 1
0
 /// <summary>
 ///  NRT Main For NRT Queuue SearchMapper
 /// </summary>
 public static ApiModels.NrtMainForNrtQueue CreateFromForNrtQueue(this DomainModels.NrtMain source)
 {
     return(new ApiModels.NrtMainForNrtQueue
     {
         NrtMainId = source.NrtMainId,
         CloseLocation = source.CloseLocation.LocationCode,
         OpenLocation = source.OpenLocation.LocationCode,
         StartDtTime = source.StartDtTime,
         EndDtTime = source.EndDtTime,
         NrtTypeCode = source.NrtType.NrtTypeCode + "-" + source.NrtType.NrtTypeName,
         NrtStatusCode = source.NrtStatus.RaStatusCode + "-" + source.NrtStatus.RaStatusName,
     });
 }
Exemplo n.º 2
0
 /// <summary>
 /// Domain Response To Web Response
 /// </summary>
 /// <param name="source"></param>
 /// <returns></returns>
 public static ApiModel.NrtMain CreateFrom(this DomainModel.NrtMain source)
 {
     return(new ApiModel.NrtMain
     {
         NrtMainId = source.NrtMainId,
         OpenLocationId = source.OpenLocationId,
         CloseLocationId = source.CloseLocationId,
         OperationId = source.OpenLocation.Operation.OperationId,
         StartDtTime = source.StartDtTime,
         EndDtTime = source.EndDtTime,
         NrtTypeId = source.NrtTypeId,
         NrtStatusId = source.NrtStatus.RaStatusKey,
         NrtVehicles = source.NrtVehicles.Select(nrtVehicle => nrtVehicle.CreateFrom()).ToList()
     });
 }