.NET Core, Angular, aspnet Framework 4.7.2, Zero 6.8.0
These are two methods in my 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 service interface:
Task Delete(EntityDto<int> input);
Task Restore(EntityDto<int> input);
Here's a picture of my angular component:
And here's the offending code in service-proxies.ts:
I have recompiled, run a refresh on swagger, rebooted, slapped my forhead several times and then banged my head against the wall ten times. The problem still doesn't seem to go away. Anyone any ideas?
4 Answer(s)
-
0
hi I guess the http verb for these two services is post. Please change them to get.
-
0
-
0
https://www.nuget.org/packages/Microsoft.AspNet.WebApi.Core
https://aspnetboilerplate.com/Pages/Documents/Dynamic-Web-API#http-attributes
-
0
Thanks @maliming. I don't want to add another nuget package for the sake of declaring a
[HttpGet]
atttribute. This is down to naming conventions, by renaming theRestore
method toGetRestore
I was able to circumvent the problem. Hardly ideal, but hey-ho! Thanks for your help in the meantime, you pointed me in thye right direction.