create base class for validators

This commit is contained in:
2020-09-08 14:33:31 +02:00
parent 2246ac9ee0
commit b0d5261a0a
6 changed files with 47 additions and 7 deletions
+2 -2
View File
@@ -5,6 +5,7 @@ using zero.Core.Entities;
using zero.Core.Extensions;
using zero.Core.Options;
using zero.Core.Plugins;
using zero.Core.Validation;
using zero.Web.Mapper;
using zero.Web.Sections;
@@ -15,7 +16,7 @@ namespace zero.Web.Defaults
public void ConfigureServices(IServiceCollection services)
{
services.AddAll(typeof(IValidator<>), ServiceLifetime.Scoped);
services.AddAll(typeof(IValidator), ServiceLifetime.Scoped);
//services.AddAll(typeof(IValidator), ServiceLifetime.Scoped);
services.AddTransient<IApplication, Application>();
//services.AddTransient<IValidator<IApplication>, ApplicationValidator>();
@@ -28,7 +29,6 @@ namespace zero.Web.Defaults
services.AddTransient<IMediaFolder, MediaFolder>();
services.AddTransient<IPreview, Preview>();
services.AddTransient<IApplicationsApi, ApplicationsApi>();
services.AddTransient<ICountriesApi, CountriesApi>();
services.AddTransient<ILanguagesApi, LanguagesApi>();