Iny my ASP.NET Web Api I use two classes.
public class Order
{
public int Id{get; set}
public int CategoryId { get; set; }
public Category Category { get; set; }
}
The class above I use to display thier data in grid. In column category it displays me the number reffering to Id from table Category.
Class category
public class Category
{
public int Id{get; set}
public string Name { get; set; }
}
Is it possible to get the name of category and display it instead of number showing the FK of this category in grid?