1
I have the following situation.
In the Bank, I have the tables State, City, with data duly registered and linked.
In View I would like to put only one Dropdown with the list of Cities, but I would like to automatically record the state id in the bank.
namespace CadastroMVC.Models
{
public class Class1
{
public int CidadeId { get; set; }
public int EstadoId { get; set; }
public string NomeCidade { get; set; }
}
}
Record where? There’s this to put in the question.
– novic
Bring the state in a field like
hidden
.– Diego Souza
I would like to record the state id in the Cities table automatically, without having to select the state once, that the tables are already listed in the bank.
– Erison Nicodemos
To save the state in a city table, you have to select the state so that the registration knows, it is not automatic...!
– novic