public GetUserResponse GetUserById(GetUserRequest request) { GetUserResponse response = new GetUserResponse(); SecurityBusinessComponent bc = DependencyInjectionHelper.GetSecurityBusinessComponent(); User user = bc.GetUserById(request.Id); response.User = SecurityAdapter.UserToDTO(user); return response; }
public UserDTO GetUserById(int id) { try { GetUserRequest request = new GetUserRequest(); request.Id = id; GetUserResponse response = Service.GetUserById(request); return response.User; } catch (Exception ex) { if (ExceptionPolicy.HandleException(ex, "PL Policy")) throw; return new UserDTO(); } }