I have this function for returning users and user count
List<User> entitiesList = DB.Users.OrderBy(x => x.UserName).ToList();
var count = DB.Users.Count
return (entitiesList, count)
The result from HTTP request is this
{
"item1":
[
{
"fullName":"Joe Smith"
},
{"fullName":"Bob Rogan"
}
]
"item2":["2"]
}
Question is why does JSON result has objects named item1 and item2, where does these names come from, I haven't specified such names anywhere, shouldn't there just be no name in such case? And how do I rename 'item1' to 'users' and 'item2' to 'count'?