I'm a little lost here. I've tried multiple different methods for returning this list of names I have but I can't seem to return them in the correct alphabetical order. This is what I've got:
[HttpGet]
[Queryable(PageSize=150)]
public IQueryable<BoyName> GetBoyNames(string letter)
{
List<BoyName> names = Db.BoyNames.Where(c => c.Name.StartsWith(letter)).OrderBy(x => x.Name).ToList();
return names.AsQueryable();
}
And my model:
public partial class BoyName
{
public int Id { get; set; }
public string Name { get; set; }
public string Meaning { get; set; }
public string Origin { get; set; }
}
It is giving me names which is nice...but I can't seem to get them to display in order.