Add profiles domain, infra, API endpoints
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
namespace RecNet.Application;
|
||||
|
||||
public class Class1
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using AutoMapper;
|
||||
using RecNet.Application.Profiles;
|
||||
|
||||
namespace RecNet.Application.Common.Mapping;
|
||||
|
||||
public class ApplicationMappingProfile : Profile
|
||||
{
|
||||
public ApplicationMappingProfile()
|
||||
{
|
||||
CreateMap<Domain.Entities.Profiles.Profile, ProfileDTO>();
|
||||
}
|
||||
}
|
||||
13
RecNet.Application/DependencyInjection.cs
Normal file
13
RecNet.Application/DependencyInjection.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace RecNet.Application;
|
||||
|
||||
public static class DependencyInjection
|
||||
{
|
||||
public static IServiceCollection AddApplication(this IServiceCollection services)
|
||||
{
|
||||
services.AddAutoMapper(_ => { }, typeof(DependencyInjection).Assembly);
|
||||
|
||||
return services;
|
||||
}
|
||||
}
|
||||
20
RecNet.Application/Profiles/ProfileDto.cs
Normal file
20
RecNet.Application/Profiles/ProfileDto.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using RecNet.Domain.Common;
|
||||
|
||||
namespace RecNet.Application.Profiles;
|
||||
|
||||
public class ProfileDTO
|
||||
{
|
||||
[JsonPropertyName("ProfileId")]
|
||||
public Guid ProfileId { get; init; }
|
||||
|
||||
[JsonPropertyName("Name")]
|
||||
public required string Name { get; init; }
|
||||
|
||||
[JsonPropertyName("Platform")]
|
||||
|
||||
public PlatformType Platform { get; init; }
|
||||
|
||||
[JsonPropertyName("CreatedAt")]
|
||||
public DateTimeOffset CreatedAt { get; init; }
|
||||
}
|
||||
@@ -6,4 +6,12 @@
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\RecNet.Domain\RecNet.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoMapper" Version="16.1.1" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user