dal + other
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
namespace PARR_API.Contracts.V1
|
||||
namespace PARR.API.Contracts.V1
|
||||
{
|
||||
// https://tproger.ru/translations/luchshie-praktiki-razrabotki-rest-api-20-sovetov/
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using PARR_API.Controllers.V1.Base;
|
||||
using PARR.API.Controllers.V1.Base;
|
||||
|
||||
namespace PARR_API.Controllers.V1
|
||||
namespace PARR.API.Controllers.V1
|
||||
{
|
||||
public class ApiStatusController : BaseApiController
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace PARR_API.Controllers.V1.Base
|
||||
namespace PARR.API.Controllers.V1.Base
|
||||
{
|
||||
[ApiController]
|
||||
public class BaseApiController : ControllerBase
|
||||
|
||||
12
PARR_API/Controllers/V1/HomeController.cs
Normal file
12
PARR_API/Controllers/V1/HomeController.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace PARR.API.Controllers.V1
|
||||
{
|
||||
public class HomeController : Controller
|
||||
{
|
||||
public IActionResult Index()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
using PARR_API.Services.Implementations;
|
||||
using PARR_API.Services.Interfaces;
|
||||
using PARR.API.Services.Implementations;
|
||||
using PARR.API.Services.Interfaces;
|
||||
|
||||
namespace PARR_API.Installers
|
||||
namespace PARR.API.Installers
|
||||
{
|
||||
/// <summary>
|
||||
/// Самописные сервисы которые используются для АПИ
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using PARR_API.Settings;
|
||||
using PARR.API.Settings;
|
||||
|
||||
namespace PARR_API.Installers
|
||||
namespace PARR.API.Installers
|
||||
{
|
||||
public static class CorsInstaller
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace PARR_API.Installers
|
||||
namespace PARR.API.Installers
|
||||
{
|
||||
/// <summary>
|
||||
/// Биндинги из конфига appsettings
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Microsoft.OpenApi.Models;
|
||||
using System.Reflection;
|
||||
|
||||
namespace PARR_API.Installers
|
||||
namespace PARR.API.Installers
|
||||
{
|
||||
public static class SwaggerInstaller
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using AutoMapper;
|
||||
|
||||
namespace PARR_API.MappingProfiles
|
||||
namespace PARR.API.MappingProfiles
|
||||
{
|
||||
public class DomainToResponseProfile : Profile
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using AutoMapper;
|
||||
|
||||
namespace PARR_API.MappingProfiles
|
||||
namespace PARR.API.MappingProfiles
|
||||
{
|
||||
public class RequestToDomainProfile : Profile
|
||||
{
|
||||
|
||||
@@ -19,6 +19,10 @@
|
||||
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.1" />
|
||||
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.5.2" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.5" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.5">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Serilog.AspNetCore" Version="7.0.0" />
|
||||
<PackageReference Include="Serilog.Extensions.Hosting" Version="7.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
|
||||
@@ -33,4 +37,8 @@
|
||||
<Folder Include="Validators\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\PARR.DAL\PARR.DAL.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,5 +1,6 @@
|
||||
using FluentValidation;
|
||||
using PARR_API.Installers;
|
||||
using PARR.API.Installers;
|
||||
using PARR.DAL;
|
||||
using Serilog;
|
||||
using System.Reflection;
|
||||
|
||||
@@ -13,6 +14,7 @@ builder.Host.UseSerilog((context, config) =>
|
||||
});
|
||||
|
||||
// Add services to the container.
|
||||
builder.Services.InstallDalServices(builder.Configuration);
|
||||
builder.Services.InstallApiServices(builder.Configuration);
|
||||
builder.Services.InstallSettings(builder.Configuration);
|
||||
builder.Services.AddAutoMapper(AppDomain.CurrentDomain.GetAssemblies());
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using PARR_API.Services.Interfaces;
|
||||
using PARR.API.Services.Interfaces;
|
||||
|
||||
namespace PARR_API.Services.Implementations
|
||||
namespace PARR.API.Services.Implementations
|
||||
{
|
||||
public class UriService : IUriService
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace PARR_API.Services.Interfaces
|
||||
namespace PARR.API.Services.Interfaces
|
||||
{
|
||||
public interface IUriService
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace PARR_API.Settings
|
||||
namespace PARR.API.Settings
|
||||
{
|
||||
public class CorsSettings
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"ConnectionStrings": {
|
||||
"DefaultConnection": "Server=10.99.253.184;Database=geo;User Id=app_geo; Password=Khdlifg(G875904HJFfd@3;"
|
||||
"DefaultConnection": "Server=10.99.253.184;Database=parr;User Id=app_parr; Password=PosdfkhT&)%sdfligL&%5546;"
|
||||
},
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
|
||||
Reference in New Issue
Block a user