1

I’m using .NET Entity Framework and every time I’m trying to access db data I get an error:

public async Task<List<model>> getModel()
{
    return await dbContext.ModelTable.ToListAysnc()
}
Guru Stron
  • 102,774
  • 10
  • 95
  • 132
galArad
  • 21
  • 2
  • 1
    There is nothing here what should result in this error directly. This error usually happens when one of `Single` method is called and there are multiple entries in the result. – Guru Stron Mar 12 '23 at 16:13
  • But there is another possible reason - check out [this answer](https://stackoverflow.com/questions/69236321/entity-framework-sequence-contains-more-than-one-matching-element/69237308#69237308). In short - you need to update EF Core packages to corresponding latest versions. – Guru Stron Mar 12 '23 at 16:13

0 Answers0