public async Task <ActionResult> Index()
        {
            var userList = new List <UserModel>();

            var url    = "api/GetUsersFromRepository";
            var result = await _client.GetRequest(new ApiResponse <UserModel>(), url);

            if (result.Success)
            {
                userList = result.Data.ToList();
            }

            return(View(userList));
        }
Ejemplo n.º 2
0
        public async Task <ActionResult> Index()
        {
            var model = new List <UserModel>();

            var uri    = "GetUsers";
            var result = await _client.GetRequest(new ApiResponse <UserModel>(), uri);

            if (result.Success)
            {
                model = result.Data.ToList();
            }

            return(View());
        }