public GetRoleResponse GetRoleById(GetRoleRequest request) { GetRoleResponse response = new GetRoleResponse(); SecurityBusinessComponent bc = DependencyInjectionHelper.GetSecurityBusinessComponent(); Role role = bc.GetRoleById(request.RoleId); response.Role = SecurityAdapter.RoleToDTO(role); return response; }
public RoleDTO GetRoleById(int id) { try { GetRoleRequest request = new GetRoleRequest(); request.RoleId = id; GetRoleResponse response = Service.GetRoleById(request); return response.Role; } catch (Exception ex) { if (ExceptionPolicy.HandleException(ex, "PL Policy")) throw; return new RoleDTO(); } }