public sealed class Repo<TContext> : IRepo<TContext>, IDisposable where TContext : DbContext, new() { #region properties /// <summary> /// Private DBContext property /// </summary> private DbContext _Context { get; } = null; /// <summary> /// Determine if Lazy Loading either activate or not /// </summary> private bool _LazyLoaded { get; set; } #endregion #region Construcors public Repo(bool LazyLoaded) { _Context = new TContext(); _LazyLoaded = LazyLoaded; _Context.ChangeTracker.LazyLoadingEnabled = LazyLoaded; } public Repo(DbContext context,bool LazyLoaded) { _Context = context; _LazyLoaded = LazyLoaded; _Context.ChangeTracker.LazyLoadingEnabled = LazyLoaded; } Error CS0417 'TContext': cannot provide arguments when creating an instance of a variable type MyTypeName Error CS0417 'TContext': cannot provide arguments when creating an instance of a variable type MyTypeName