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)); }
public IActionResult GetCitizenshipNumber(int id) { var result = UserModelFaker.GetUsers().FirstOrDefault(q => q.Id == id).CitizenshipNumber; return(Ok(result)); }
public IActionResult Get(int id) { var result = UserModelFaker.GetUsers().FirstOrDefault(q => q.Id == id); return(Ok(result)); }
public IActionResult GetListIQueryable() { var result = UserModelFaker.GetUsers().Where(q => q.Age > 2).AsQueryable(); return(Ok(result)); }
public IActionResult GetList() { var result = UserModelFaker.GetUsers(); return(Ok(result)); }