Beispiel #1
0
        public IActionResult GetPagedList()
        {
            var pagedList = new GenericPagedList <UserModel>();

            pagedList.Items      = UserModelFaker.GetUsers();
            pagedList.PageIndex  = 0;
            pagedList.PageSize   = 10;
            pagedList.TotalCount = 3;
            pagedList.TotalPages = 1;
            return(Ok(pagedList));
        }
Beispiel #2
0
        public IActionResult GetCitizenshipNumber(int id)
        {
            var result = UserModelFaker.GetUsers().FirstOrDefault(q => q.Id == id).CitizenshipNumber;

            return(Ok(result));
        }
Beispiel #3
0
        public IActionResult Get(int id)
        {
            var result = UserModelFaker.GetUsers().FirstOrDefault(q => q.Id == id);

            return(Ok(result));
        }
Beispiel #4
0
        public IActionResult GetListIQueryable()
        {
            var result = UserModelFaker.GetUsers().Where(q => q.Age > 2).AsQueryable();

            return(Ok(result));
        }
Beispiel #5
0
        public IActionResult GetList()
        {
            var result = UserModelFaker.GetUsers();

            return(Ok(result));
        }