I have the following query:
var result = await _dbContext.ApplicationItems.ToListAsync();
At runtime I get an exception on that query line:
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;
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.