Browse Source

Added DeletePhone to IPersonAppService.

pull/96/head
Halil İbrahim Kalkan 9 years ago
parent
commit
0273225fe9
  1. 5
      test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/IPersonAppService.cs
  2. 3
      test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/PersonAppService.cs

5
test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/IPersonAppService.cs

@ -7,8 +7,13 @@ namespace Volo.Abp.TestApp.Application
{ {
public interface IPersonAppService : IAsyncCrudAppService<PersonDto> public interface IPersonAppService : IAsyncCrudAppService<PersonDto>
{ {
//URL: [GET] /api/people/{id}?type=office
Task<ListResultDto<PhoneDto>> GetPhones(Guid id, GetPersonPhonesFilter filter); Task<ListResultDto<PhoneDto>> GetPhones(Guid id, GetPersonPhonesFilter filter);
//URL: [POST] /api/people/{id}/phones
Task<PhoneDto> AddPhone(Guid id, PhoneDto phoneDto); Task<PhoneDto> AddPhone(Guid id, PhoneDto phoneDto);
//URL: [DELETE] /api/people/{id}/phones/{phoneId}
Task DeletePhone(Guid id, long phoneId);
} }
} }

3
test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/PersonAppService.cs

@ -17,7 +17,6 @@ namespace Volo.Abp.TestApp.Application
} }
//URL: [GET] /api/people/{id}?type=office
public async Task<ListResultDto<PhoneDto>> GetPhones(Guid id, GetPersonPhonesFilter filter) public async Task<ListResultDto<PhoneDto>> GetPhones(Guid id, GetPersonPhonesFilter filter)
{ {
var phones = (await GetEntityByIdAsync(id)).Phones var phones = (await GetEntityByIdAsync(id)).Phones
@ -29,7 +28,6 @@ namespace Volo.Abp.TestApp.Application
); );
} }
//URL: [POST] /api/people/{id}/phones
public async Task<PhoneDto> AddPhone(Guid id, PhoneDto phoneDto) public async Task<PhoneDto> AddPhone(Guid id, PhoneDto phoneDto)
{ {
var person = await GetEntityByIdAsync(id); var person = await GetEntityByIdAsync(id);
@ -40,7 +38,6 @@ namespace Volo.Abp.TestApp.Application
return ObjectMapper.Map<Phone, PhoneDto>(phone); return ObjectMapper.Map<Phone, PhoneDto>(phone);
} }
//URL: [DELETE] /api/people/{id}/phones/{phoneId}
public async Task DeletePhone(Guid id, long phoneId) public async Task DeletePhone(Guid id, long phoneId)
{ {
var person = await GetEntityByIdAsync(id); var person = await GetEntityByIdAsync(id);

Loading…
Cancel
Save