Added PersonService interface and DTOs for person
This commit is contained in:
1 parent
de1f87b3e4
commit
7d514d9b3c
3 files changed
+29
No files matched your search
@@ -0,0 +1,8 @@
|
|||||||
|
namespace api.DTOs;
|
||||||
|
|
||||||
|
public class PersonRequestDto
|
||||||
|
{
|
||||||
|
public string Username { get; set; }
|
||||||
|
public string RealName { get; set; }
|
||||||
|
public DateOnly Birthday { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
namespace api.DTOs;
|
||||||
|
|
||||||
|
public class PersonResponseDto
|
||||||
|
{
|
||||||
|
public string Username { get; set; }
|
||||||
|
public string RealName { get; set; }
|
||||||
|
public DateOnly Birthday { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using api.DTOs;
|
||||||
|
|
||||||
|
namespace api.Services
|
||||||
|
{
|
||||||
|
public interface IPersonService
|
||||||
|
{
|
||||||
|
Task<IEnumerable<PersonResponseDto>> GetAllPersonsAsync();
|
||||||
|
Task<PersonResponseDto> GetPersonByIdAsync(int id);
|
||||||
|
Task AddPersonAsync(PersonRequestDto PersonDto);
|
||||||
|
Task UpdatePersonAsync(int id, PersonRequestDto PersonDto);
|
||||||
|
Task DeletePersonAsync(int id);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user