I have the following situation.
In the Bank, I have the tables State, City, with the data properly registered and linked.
In View I would like to put only a DropDown with the list of Cities, but I would like to automatically record the state id in the database.
namespace CadastroMVC.Models
{
public class Class1
{
public int CidadeId { get; set; }
public int EstadoId { get; set; }
public string NomeCidade { get; set; }
}
}