je dois convertir ci-dessous requête SQL dans une requête LinqConvertir une requête SQL dans une Linq à l'instruction SQL
select *
from bancos
where codigobanco in
(select distinct codigobanco
from headerarquivo
where (MONTH(datahorageracao)=12) and (YEAR(datahorageracao)=2010))
Comment pourrais-je faire pour transformer cette requête SQL dans une requête Linq?
Je l'ai LINQ à l'entité \t var bancos = (de ha ouroDB.HeaderArquivoes \t \t \t \t \t .Lorsque (h => h.DataHoraGeracao.Month == dtpGeracao.Value.Month) \t \t \t \t \t .Where (h => == h.DataHoraGeracao.Year dtpGeracao.Value.Year) \t \t \t \t de bc dans ouroDB.Bancos \t \t \t \t. Où (b => b.CodigoBanco.Contains (ha.CodigoBanco)) \t \t \t \t \t sélectionnez bc) .Distinct(). OrderBy (b => b.NomeBanco); – Ederaldo