new API project

This commit is contained in:
2021-11-29 18:25:50 +01:00
parent 192a0d795a
commit 346a674306
85 changed files with 940 additions and 410 deletions
@@ -5,5 +5,7 @@ public static class BackofficeConstants
public static class HttpErrors
{
public const string NoIdMatchOnUpdate = "The Id as part of the URL does not match the Id of the model";
public const string IdNotFound = "Could not find persisted model for the given Id";
}
}
@@ -1,28 +0,0 @@
using AutoMapper;
namespace zero.Backoffice.Configuration;
/// <summary>
///
/// </summary>
public class BackofficeMaps
{
public MapperConfiguration MapperConfiguration { get; internal set; }
internal List<Action<IMapperConfigurationExpression>> Expressions { get; }
public void Configure(Action<IMapperConfigurationExpression> expression)
{
Expressions.Add(expression);
}
internal void Run(IMapperConfigurationExpression mapperConfig)
{
foreach (var expression in Expressions)
{
expression(mapperConfig);
}
}
}
@@ -1,8 +1,4 @@
using AutoMapper;
using System.Linq.Expressions;
using zero.Backoffice.Modules.Search;
namespace zero.Backoffice.Configuration;
namespace zero.Backoffice.Configuration;
public class BackofficeOptions
{
@@ -21,11 +17,6 @@ public class BackofficeOptions
/// </summary>
public ExternalServicesOptions ExternalServices { get; set; } = new();
/// <summary>
/// Configure search maps
/// </summary>
public SearchOptions Search { get; set; } = new();
/// <summary>
/// Options for configuring the vite development server
/// </summary>
@@ -40,9 +31,4 @@ public class BackofficeOptions
/// Language ISO codes which are supported by the zero backoffice
/// </summary>
public string[] SupportedLanguages { get; internal set; }
/// <summary>
/// Configuration for AutoMapper
/// </summary>
public BackofficeMaps Mapper { get; private set; } = new();
}