Refactor endpoint commands and mappings
Removed unused `using` directives across files for cleanup. Deleted `CreateEndpointCommand` and `Endpoint` classes as they are no longer needed. Added `GetOrCreateCommand` to handle endpoint retrieval or creation. Updated `MappingProfile` to remove mappings for `CreateEndpointCommand` and ensure proper inheritance from `AutoMapper.Profile`.
This commit is contained in:
parent
46664d62ba
commit
c6f2437300
@ -1,22 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ReC.Application.Endpoints.Commands;
|
||||
|
||||
public class CreateEndpointCommand
|
||||
{
|
||||
}
|
||||
|
||||
public class Endpoint
|
||||
{
|
||||
public bool Active { get; set; } = true;
|
||||
|
||||
public string? Description { get; set; }
|
||||
|
||||
public string Uri { get; set; } = null!;
|
||||
}
|
||||
@ -1,6 +1,7 @@
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using MediatR;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using ReC.Domain.Entities;
|
||||
|
||||
namespace ReC.Application.Endpoints.Commands;
|
||||
|
||||
|
||||
@ -1,18 +1,12 @@
|
||||
using AutoMapper;
|
||||
using ReC.Application.Endpoints.Commands;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ReC.Application.Endpoints.Commands;
|
||||
using ReC.Domain.Entities;
|
||||
|
||||
namespace ReC.Application.Endpoints;
|
||||
|
||||
public class MappingProfile : Profile
|
||||
public class MappingProfile : AutoMapper.Profile
|
||||
{
|
||||
public MappingProfile()
|
||||
{
|
||||
CreateMap<CreateEndpointCommand, Endpoint>();
|
||||
CreateMap<GetOrCreateCommand, Endpoint>();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user