示例#1
0
        public async Task Should_Get_All_Persons()
        {
            var output = await _personAppService.GetAll((new GetAllPersonInput()));

            output.Items.Count.ShouldBe(2);
            output.Items.Count(t => t.Name == "PP").ShouldBe(1);
        }
        public async Task <ActionResult> Index()
        {
            var people = await _personAppService.GetAll();

            var output = new PersonViewModel(people);

            return(View(output));
        }
示例#3
0
        public IActionResult GetPeople()
        {
            var people = _personAppService.GetAll();

            var results = Mapper.Map <IEnumerable <Models.Person> >(people);

            return(Ok(results));
        }
        public async Task <ActionResult> Index(GetAllPersonInput input)
        {
            var output = await _personAppService.GetAll(input);

            var model = new IndexViewModel(output.Items);


            return(View(model));
        }
示例#5
0
        public void Should_Get_All_People_With_Success()
        {
            //Act
            var response = _personAppService.GetAll(new GetAllPeopleDto()
            {
                PageSize = 10
            });

            //Assert
            Assert.False(LocalNotification.HasNotification());
            response.Items.Count.ShouldBe(1);
        }
示例#6
0
        public async Task <IActionResult> PeopleList()
        {
            if (!HttpContext.User.Identity.IsAuthenticated)
            {
                return(View("../Home/Login"));
            }
            else
            {
                var output = await _personAppService.GetAll();

                return(View("PeopleList", output));
            }
        }
 public IActionResult Index()
 {
     return(Ok(_personAppService.GetAll()));
 }
示例#8
0
 public IActionResult GetAll()
 {
     return(Response(personAppService.GetAll()));
 }
示例#9
0
 public Task <IEnumerable <PersonViewModel> > Get()
 {
     return(_personAppService.GetAll());
 }
示例#10
0
        public async Task <IActionResult> Get()
        {
            var response = await _personAppService.GetAll();

            return(Ok(response));
        }
 public async Task <IActionResult> Index()
 {
     return(View(await _personAppService.GetAll()));
 }
示例#12
0
        public IActionResult Get([FromQuery] GetAllPeopleDto requestDto)
        {
            var response = _personAppService.GetAll(requestDto);

            return(CreateResponseOnGetAll(response, PERSON_NAME));
        }