Ejemplo n.º 1
0
 public static CasePlanInstanceRoleResult ToDto(CasePlanInstanceRole role)
 {
     return(new CasePlanInstanceRoleResult
     {
         Id = role.EltId,
         Name = role.Name
     });
 }
 public static RoleModel ToModel(this CasePlanInstanceRole role, string casePlanInstanceId)
 {
     return(new RoleModel
     {
         RoleId = role.Id,
         IsCaseOwner = false,
         RoleName = role.Name,
         Claims = role.Claims.Select(_ => new RoleClaimModel
         {
             ClaimName = _.Key,
             ClaimValue = _.Value
         }).ToList(),
         CasePlanInstanceId = casePlanInstanceId,
         CreateDateTime = DateTime.UtcNow,
         UpdateDateTime = DateTime.UtcNow
     });
 }