-1
I want to convert the code select
for a consultation LINQ
SELECT bpac.cmp FROM bpac
union
SELECT bpai.cmp FROM bpai
group by cmp
order by cmp desc
I’m trying to get the first table and I’m already having error:
List<string> listaBpac = modelOff.bpacs.Where(p => p.ibge == oUsuario.ibge)
.Select(p => new { p.cmp })
.ToList();
cannot implicitly Convert type 'system.collections.Generic.list "Anonimous type: string Cmp"' to 'system.collections.Generic.list "Anonimous type: string"'