View to edit a model that has a list of another model

0

I have the following models:

public class Receta
{
    public int ID { get; set; }
    public string Name { get; set; }       
    public ICollection<Ingredientes> Ingredientess { get; set; }
}

That in turn:

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

When we create a recipe, we must be able to select the ingredients from existing ones, or to create a new one

I do not know how to create the view that does that, and how to associate it with the models.

Greetings, and thanks.

    
asked by Meldrel 12.07.2018 в 11:37
source

0 answers