Can't execute Query in EF6.3

.net entity-framework-6 exception

Question

I have the following query:

var result = await _dbContext.ApplicationItems.ToListAsync();

At runtime I get an exception on that query line:

enter image description here

I don't know why this exception is happening.

The class ApplicationItem looks like this:

public class ApplicationItem : EntityBase
{
    public List<ApplicationItemRole> ApplicationItemRoles { get; set; } = new List<ApplicationItemRole();
    public string AssemblyName { get; set; }
    public string ModuleName { get; set; }
    public string Name { get; set; }
    public string ViewModelType { get; set; }
}

and EntityBase has only one public property Id;

1
0
4/14/2020 6:30:37 PM

Popular Answer

The problem was that in my solution of 24 projects there was an older version of EF installed package. So When I updated this package, all problems have gone away. All working now.

0
4/17/2020 5:41:06 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow