1
I am trying to perform a simple query with LINQ, and the code below is returning me repeated records in the first 5 lines of the list.
var teste = (from p in db.VW_PAGAMENTO_RECEBIDO where p.ID_Pessoa == 23 select p).ToList();
When I run the SQL script in SQL Manager, the records are displayed correctly (as shown below).
Note that the file code is different in all records through Sqlmanager. However, when running via LINQ, the first 5 records display the repested data, equal to the first.
You could post your model
VW_PAGAMENTO_RECEBIDO
?– Randrade
You are pointing the webconfig to the same bank?
– Marco Souza
Yes I’m pointing to the same webconfig @Dotnet
– Gleison França
Try var test = (from p in db.VW_PAGAMENTO_RECEBIDO Where p.Id_person == 23 select new { p } ).Tolist();
– Marco Souza
The ideal would be for you to capture the query sql generated in Brazilian and see what was created.
– Marco Souza