public static CidadeCommand ToModelDomain(Cidade cidade) { if (cidade == null) { return(null); } var cidadeCommand = new CidadeCommand( cidade.Nome, cidade.IdCidade, cidade.EstadoId); return(cidadeCommand); }
public static Cidade ToDomainModel(CidadeCommand cidadeCommand) { if (cidadeCommand == null) { return(null); } var cidade = new Cidade( cidadeCommand.Nome, cidadeCommand.EstadoId.Value, cidadeCommand.IdCidade); return(cidade); }