I have my entity Element with navigation property Ingredient:

public class Element
{
    public int Id { get; set; }
    public string Name { get; set; }
    public virtual ICollection<Ingredient> Ingredients { get; set; }        
    public string Description { get; set; }

}

public class Ingredient
{
    public int Id { get; set; }
    public string Name { get; set; }
}

API controller defined:

[HttpGet("elements", Name = "GetElement")]
public Element GetElement ([FromUri] Element element)
 {
  //<..>
 }

How do you format a URI for passing in the ingredient parameters?

Related posts

Recent Viewed