Core.API ist für die Paketierung konfiguriert.

This commit is contained in:
Developer 02 2024-06-20 16:58:39 +02:00
parent 0ad92e7592
commit b6adf7ed8b
4 changed files with 20 additions and 15 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1020 KiB

View File

@ -33,15 +33,13 @@ namespace DigitalData.Core.API
/// <param name="message">Optional. A custom error message to include in the response.</param>
/// /// <param name="messageKey">Optional. A custom error message key to include in the response.</param>
/// <returns>An ObjectResult representing an internal server error (status code 500).</returns>
public static ObjectResult InnerServiceError(this ControllerBase controllerBase, Exception? ex = null, string? message = null, Enum? messageKey = null)
public static ObjectResult InnerServiceError(this ControllerBase controllerBase, Exception? ex = null, string? message = null)
{
var sb = new StringBuilder();
if (ex is not null)
sb.AppendLine(ex.Message);
if (message is not null)
sb.AppendLine(message);
if (messageKey is not null)
sb.AppendLine(messageKey.ToString());
return controllerBase.StatusCode(500, sb.Length > 0 ? sb.ToString() : null);
}

View File

@ -2,9 +2,20 @@
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<IsPackable>true</IsPackable>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<OutputType>Library</OutputType>
<Description>This package provides a comprehensive set of API controllers and related utilities for the DigitalData.Core library. It includes generic CRUD controllers, localization extensions, middleware for security policies, and application model conventions.</Description>
<PackageId>DigitalData.Core.API</PackageId>
<Version>1.0.0</Version>
<Authors>Digital Data GmbH</Authors>
<Company>Digital Data GmbH</Company>
<Product>DigitalData.Core.API</Product>
<Copyright>Copyright 2024</Copyright>
<RepositoryUrl>http://git.dd:3000/AppStd/WebCoreModules.git</RepositoryUrl>
<PackageTags>digital data core api</PackageTags>
<PackageIcon>Assets\icon.png</PackageIcon>
</PropertyGroup>
<ItemGroup>
@ -16,4 +27,12 @@
<ProjectReference Include="..\DigitalData.Core.DTO\DigitalData.Core.DTO.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="Assets\icon.png">
<PackagePath>\</PackagePath>
<Pack>True</Pack>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>

View File

@ -1,12 +0,0 @@
{
"profiles": {
"DigitalData.Core.API": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:59445;http://localhost:59446"
}
}
}