Fill a GridView Entity Framework ASP.Net

0

How can I fill a Gridview with the result of a Linq query of an EF model.

var vQueryTom = (from tom in cargaDocEntities.REPRESENTATIVE TOMOR                  select tom);

    
asked by GoGonta 02.08.2018 в 16:04
source

1 answer

0

If you put it in your DataSource it should work.

var vQueryTom = (from tom in cargaDocEntities.TOMADOR_REPRESENTANTE select tom);

myGv.DataSource = vQueryTom.ToList();
o
myGv.DataSource = vQueryTom;
myGv.DataBind();
    
answered by 02.08.2018 в 16:50