Ejemplo n.º 1
0
        public async Task <IActionResult> Index(Guid id)
        {
            var presenter     = new MvcGetUserProfilePresenter();
            var useCaseResult = await mediator.Send(new GetUserProfile(id, presenter));

            if (!useCaseResult.IsSuccessful)
            {
                return(useCaseResult.ResultCategory == ResultCategory.NotFound
                    ? NotFound()
                    : StatusCode(500));
            }

            return(View(presenter.GetViewModel()));
        }
Ejemplo n.º 2
0
 public MvcGetUserProfilePresenterTests()
 {
     presenter = new MvcGetUserProfilePresenter();
 }