5
I’m using a component of combobox with the Dapper, but I’m not able to fill the combobox properly, follow code excerpt:
LookUpEdit ctlControle = (LookUpEdit) pr_Controle;
var parametro = new DynamicParameters();
parametro.Add("@TABELA_NOME", pr_TabelaNome);
parametro.Add("@TABELA_CAMPO_VALOR", pr_CampoValor);
parametro.Add("@TABELA_CAMPO_DISPLAY", pr_CampoDisplay);
ctlControle.Properties.DataSource = acessoDados.criarConexao().Query("PRP_PREENCHER_COMBO", parametro, commandType: CommandType.StoredProcedure);
ctlControle.Properties.ValueMember = pr_CampoValor;
ctlControle.Properties.DisplayMember = pr_CampoDisplay;
ctlControle.Properties.PopulateColumns();
So when adding to datasource it wrongly fills by placing all fields on the same line of Combobox (lookupedit of devexpress). How can I do this?
is a very interesting solution, there is no way to do this without putting a Classededados ? because I’m doing it in a generic function and I couldn’t get a way to pass a Classededados as parameter.
– MrZerocaL
another issue, worth thinking of using Dapper or better stay in the EF itself ?
– MrZerocaL
You can do with
ExpandoObject
, but I’m not sure if it works. About Dapper or EF, it depends on what you want. Dapper gives a little more work but the performance gets animal. Already the EF solves everything for you. You only care about the business rule of your system, but it is obviously slower.– Leonel Sanches da Silva
I got it, thanks for your help, I owe you a bill =]
– MrZerocaL
Don’t be so ;)
– Leonel Sanches da Silva