not able to retrieve only entites from (IDbSet<TEntity> _entities) without converting into list throwing error "the function requires all threads to run".
not able to retrieve only entites from (IDbSet<TEntity> _entities) without converting into list throwing error "the function requires all threads to run".
Please someone help me to resolve this problem, because at some places its working as expected.
But sometimes throwing error.
internal sealed class GenericRepository<TEntity> : IGenericRepository<TEntity> where TEntity : class
{
#region Global Variables
private readonly BVTEntities context;
private readonly IDbSet<TEntity> _entities;
/// <summary>
/// Base entity
/// </summary>
IDbSet<TEntity> IGenericRepository<TEntity>.Table => this._entities;
#endregion
.........
}
when I am trying to access this property from my code, its throwing error
Calling code:

This similar code was working fine till a month back, but now suddenly one by one the methods present in Generic repository got started to malfunction.
These methods also present in Generic Repository, but only the highlighted method works.
public TEntity GetById(Guid id)
{
return _entities.Find(id);
}
/// <summary>
/// Get all records.
/// </summary>
/// <returns></returns>
public IEnumerable<TEntity> GetAll()
{
return _entities.ToList();
}
4 days back, I updated my entity framework version from 6.4.0 to 6.4.4 ( is this causing any issue)
@DuaneArnold-0443
EF is already using the Repository pattern, and the usage of the generic Repository over EF is not optimal. I avoid using the generic repository. I don't know you changing to framework 6.4.0 is causing problems. Does EF have a 6.4.4 version?
https://docs.microsoft.com/en-us/dotnet/api/system.data.entity.dbcontext?view=entity-framework-6.2.0
Thank you so much for all your valuable inputs. @DuaneArnold-0443 @AddWebSolution-0525
The root cause of the issue was due to this below-mentioned line was missing from the windows service startup file,
Environment.SetEnvironmentVariable("AppendManifestToken_SQLiteProviderManifest", ";BinaryGUID=True;");
Mistakenly it got removed and created big chaos in the application.
7 people are following this question.