Hi,
This is the result...
System.NullReferenceException: Object reference not set to an instance of an object.
at reos.ChartOfAccounts.ChartOfAccountsAppService.Create(CreateOrEditChartOfAccountDto input) in D:\OneDrive\Projects\reos\src\reos.Application\ChartOfAccounts\ChartOfAccountsAppService.cs:line 137
at Abp.Threading.InternalAsyncHelper.AwaitTaskWithPostActionAndFinally(Task actualReturnValue, Func1 postAction, Action1 finalAction)
at reos.ChartOfAccounts.ChartOfAccountsAppService.CreateOrEdit(CreateOrEditChartOfAccountDto input) in D:\OneDrive\Projects\reos\src\reos.Application\ChartOfAccounts\ChartOfAccountsAppService.cs:line 115
at lambda_method(Closure , Object )
at Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable.Awaiter.GetResult()
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
I found the problem.
Public const string LocalizationSourceName = "reos";
I had changed the value on this property which meant that the localization file (xml) was not being found.
Thank you @ismcagdas
I had just temporarily commented out this line <vc:account-languages></vc:account-languages>
which doesn't seem to be bringing an issue.
@ismcagdas,
The entire solution including all projects?
Hi,
Nothing has changed in locolization.
This actually worked. Thank you.
Hi,
I actually changed all filter methods and removed the ToString()
where the property was a string and it worked well.
Allow me to close this now. Many thanks for the help. Cheers!
Hi,
InvoiceNumber is actually a string. And the same issue is occuring in almost all look up tables.
Here you go. That's the entire code block.
var query = _lookup_rentalInvoiceRepository.GetAll().WhereIf(
!string.IsNullOrWhiteSpace(input.Filter),
e=> e.InvoiceNumber.ToString().Contains(input.Filter)
);
var totalCount = await query.CountAsync();
var rentalInvoiceList = await query
.PageBy(input)
.ToListAsync();
var lookupTableDtoList = new List<TransactionRentalInvoiceLookupTableDto>();
foreach(var rentalInvoice in rentalInvoiceList){
lookupTableDtoList.Add(new TransactionRentalInvoiceLookupTableDto
{
Id = rentalInvoice.Id,
DisplayName = string.Format(rentalInvoice.InvoiceNumber?.ToString(), " - ", rentalInvoice.Description, "(", rentalInvoice.Status, ")")
});
}
return new PagedResultDto<TransactionRentalInvoiceLookupTableDto>(
totalCount,
lookupTableDtoList
);