I am creating action from Edit to edit the data of my models . What happens is that I use ViewModel to "join" several models into one.
Okay, I can get data from models which are not List<>
, ie models that are not a list. My case is that I have lists and needed to get all the records for the id
I'm passing in the Action signature so that the data can be loaded onto the screen, and edit that data. >
The code I have is this one:
CliCliente cliente = db.CliCliente.Find(id);
Tabela2 tabela2 = db.Tabela2.Find(id);
Tabela3 tabela3 = db.Tabela3.Find(id);
List<Tabela4> tabela4 = db.Tabela4.ToList<Tabela4>();
How could I do to scan and bring the specific list data related to the List<Tabela4> tabela4 = db.Tabela4.ToList<Tabela4>();
sent in the signature of the action ?