Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Argument of type 'number' is not assignable to parameter of type 'EntityDtoOfInt32' #8521


User avatar
0
BobIngham created

.net core, angular, aspnet framework 4.7.1, Zero 6.8.0

I have this in my app service ;

public async Task Delete(EntityDto<int> input)
{
    await _ncDocumentRepository.DeleteAsync(input.Id);
}

public async Task Restore(EntityDto<int> input)
{
    using (_unitOfWorkManager.Current.DisableFilter(AbpDataFilters.SoftDelete))
    {
        var model = await _ncDocumentRepository.FirstOrDefaultAsync(m => m.Id == input.Id);
        model.IsDeleted = false;
        await _ncDocumentRepository.UpdateAsync(model);
    }
}

This is my interface:

Task Delete(EntityDto<int> input);
Task Restore(EntityDto<int> input);

Here's a picture of my angular controller:

And here's the offending code in service-proxies.ts:

If I manually change EntityDtoOfInt32 to number in my service proxy to test the code I get the following error:

I have refreshed nswag, rebooted, slapped my hand forcefully against my forehead and resorted to baging my head against the wall several times. It didn't help. Anyone, any ideas?


1 Answer(s)
  • User Avatar
    0
    BobIngham created

    Answering this to try push it to the top of the list due to forum sorting problem.