I want to show the result of the procedure in a List
I added in the model and generated this code.
public virtual ObjectResult<string> SP_ListaDadosCarteiraPGC(Nullable<int> ano, Nullable<int> mes, string codex, string adabas)
{
var anoParameter = ano.HasValue ?
new ObjectParameter("ano", ano) :
new ObjectParameter("ano", typeof(int));
var mesParameter = mes.HasValue ?
new ObjectParameter("mes", mes) :
new ObjectParameter("mes", typeof(int));
var codexParameter = codex != null ?
new ObjectParameter("codex", codex) :
new ObjectParameter("codex", typeof(string));
var adabasParameter = adabas != null ?
new ObjectParameter("adabas", adabas) :
new ObjectParameter("adabas", typeof(string));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<string>("SP_ListaDadosCarteiraPGC", anoParameter, mesParameter, codexParameter, adabasParameter);
}
Now how do I retrieve the return from this procedure?
I've tried more then just the value 'MG15200531691'
ObjectResult<string> products = dbmapa.SP_ListaDadosCarteiraPGC(2016, 3, "MG15200531691", null);
List<string> viewProducts = products.ToList();