Hi I'm working with nopcommerce 4.2 I'm trying to add a new entity, I created the Entity and Map classes but i'm having this error:
InvalidOperationException: No database provider has been configured for this DbContext. A provider can be configured by overriding the DbContext.OnConfiguring method or by using AddDbContext on the application service provider. If AddDbContext is used, then also ensure that your DbContext type accepts a DbContextOptions<TContext> object in its constructor and passes it to the base constructor for DbContext.
Microsoft.EntityFrameworkCore.Internal.DbContextServices.Initialize(IServiceProvider scopedProvider, IDbContextOptions contextOptions, DbContext context)
DependencyResolutionException: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = CatalogSettings (DelegateActivator), Services = [Nop.Core.Domain.Catalog.CatalogSettings], Lifetime = Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> No database provider has been configured for this DbContext. A provider can be configured by overriding the DbContext.OnConfiguring method or by using AddDbContext on the application service provider. If AddDbContext is used, then also ensure that your DbContext type accepts a DbContextOptions<TContext> object in its constructor and passes it to the base constructor for DbContext. (See inner exception for details.)
Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable<Parameter> parameters, out object decoratorTarget)
DependencyResolutionException: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = PluginService (ReflectionActivator), Services = [Nop.Services.Plugins.IPluginService], Lifetime = Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = CatalogSettings (DelegateActivator), Services = [Nop.Core.Domain.Catalog.CatalogSettings], Lifetime = Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> No database provider has been configured for this DbContext. A provider can be configured by overriding the DbContext.OnConfiguring method or by using AddDbContext on the application service provider. If AddDbContext is used, then also ensure that your DbContext type accepts a DbContextOptions<TContext> object in its constructor and passes it to the base constructor for DbContext. (See inner exception for details.) (See inner exception for details.)
Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable<Parameter> parameters, out object decoratorTarget)
TargetInvocationException: Exception has been thrown by the target of an invocation.
System.RuntimeMethodHandle.InvokeMethod(object target, object[] arguments, Signature sig, bool constructor, bool wrapExceptions)
CustomAttributeFormatException: 'Policy' property specified was not found.
System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, int decoratedMetadataToken, int pcaCount, RuntimeType attributeFilterType, bool mustBeInheritable, IList derivedAttributes)
Please what i'm missing? or is not recomdable add entities directly to nopcommerce core?
thanks