- ABP Framework version: v7.2.2
- UI type: Blazor
- DB provider: EF Core
- Tiered (MVC): yes
- Exception message and stack trace: System.Data.SqlTypes.SqlNullValueException: Data is Null. This method or property cannot be called on Null values.
- Steps to reproduce the issue: 1) Run the appliction 2) Load component. 3) I get this error when await AppService.GetAsync(Id); this line of code is getting executed
Below is the complete exception:
System.Data.SqlTypes.SqlNullValueException: Data is Null. This method or property cannot be called on Null values. at Microsoft.Data.SqlClient.SqlBuffer.get_String() at lambda_method3306(Closure, QueryContext, DbDataReader, ResultContext, SplitQueryResultCoordinator) at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()
** NOTE:** We are currently manually merging code from blazor assembly (non commercial) to blazor server side solution (abp commercial license). Same code is working in old solution.
6 Answer(s)
-
0
hi
How can I reproduce this problem in a new template project?
-
0
Can we connect over the call please?
-
0
Hi,
I have created an AppService in Application project using below code:
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public class LocationAppService : CrudAppService< Location, LocationDto, int, PagedAndSortedResultRequestDto, CreateUpdateLocationDto>, ILocationAppService
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
In blazor page I have added below code:
@inherits AbpCrudPageBase<ILocationAppService, LocationDto, int, PagedAndSortedResultRequestDto, CreateUpdateLocationDto>
AND
inside OnInitializedAsync() method I am writing below inbuilt method:
await AppService.GetAsync(LocationId); ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
**NOTE: Same code is working in non commercial web assembly solution. it stopped working when we are manually merging code to commercial server assembly solution. Do we need to make any specific changes in entity or service craetion etc. when migrtaing? **
-
0
hi
If you can share a simple project to reproduce that will be great.
liming.ma@volosoft.com
-
0
hi
If you can share a simple project to reproduce that will be great.
liming.ma@volosoft.com
It is difficult to setup a new project again. Can we connect over the call now?
-
0
hi
It is also difficult to find the reason via the call.
I always need to reproduce the problem on my locally.