You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m using version 8.0.0 of the Ardalis.Specification library. When the CreateBrandRequest event is triggered as shown in the screenshot, the FluentValidation implemented CreateBrandRequestValidator method runs. The IReadRepository _repository is injected and is not null, and the name parameter is not null, but when I call the repository method with the BrandByNameSpec parameter on line 27, I get a System.NullReferenceException: 'Object reference not set to an instance of an object.' error on this line. I would appreciate your help. Thank you.
Stack Trace :
at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.ExecuteAsync[TResult](Expression query, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.ExecuteAsync[TResult](Expression expression, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ExecuteAsync[TSource,TResult](MethodInfo operatorMethodInfo, IQueryable1 source, Expression expression, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ExecuteAsync[TSource,TResult](MethodInfo operatorMethodInfo, IQueryable1 source, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.FirstOrDefaultAsync[TSource](IQueryable1 source, CancellationToken cancellationToken) at Ardalis.Specification.EntityFrameworkCore.RepositoryBase1.d__15.MoveNext()
at JTR.WebApi.Application.Catalog.Brands.CreateBrandRequestValidator.<>c__DisplayClass1_0.<<-ctor>b__1>d.MoveNext()
The text was updated successfully, but these errors were encountered:
Hello,
I’m using version 8.0.0 of the Ardalis.Specification library. When the CreateBrandRequest event is triggered as shown in the screenshot, the FluentValidation implemented CreateBrandRequestValidator method runs. The IReadRepository _repository is injected and is not null, and the name parameter is not null, but when I call the repository method with the BrandByNameSpec parameter on line 27, I get a System.NullReferenceException: 'Object reference not set to an instance of an object.' error on this line. I would appreciate your help. Thank you.
Stack Trace :
at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.ExecuteAsync[TResult](Expression query, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.ExecuteAsync[TResult](Expression expression, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ExecuteAsync[TSource,TResult](MethodInfo operatorMethodInfo, IQueryable
1 source, Expression expression, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ExecuteAsync[TSource,TResult](MethodInfo operatorMethodInfo, IQueryable
1 source, CancellationToken cancellationToken)at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.FirstOrDefaultAsync[TSource](IQueryable
1 source, CancellationToken cancellationToken) at Ardalis.Specification.EntityFrameworkCore.RepositoryBase
1.d__15.MoveNext()at JTR.WebApi.Application.Catalog.Brands.CreateBrandRequestValidator.<>c__DisplayClass1_0.<<-ctor>b__1>d.MoveNext()
The text was updated successfully, but these errors were encountered: