Exemplo n.º 1
0
 private CTMS_PARENTGUIDELINE ModelToEntity(ParentGuideLine model)
 {
     if (model != null)
     {
         var entity = new CTMS_PARENTGUIDELINE()
         {
             ID          = Guid.NewGuid().ToString(),
             GUIDELINEID = model.GuideLineId,
             PARENTID    = model.PARENTID
         };
         return(entity);
     }
     return(null);
 }
Exemplo n.º 2
0
 private ParentGuideLine EntityToModel(CTMS_PARENTGUIDELINE entity)
 {
     if (entity != null)
     {
         var model = new ParentGuideLine()
         {
             Id          = entity.ID,
             GuideLineId = entity.GUIDELINEID,
             PARENTID    = entity.PARENTID,
             ParentName  = string.IsNullOrEmpty(entity.PARENTID) ? null : GetSimpleModel(entity.PARENTID).Name,
         };
         return(model);
     }
     return(null);
 }