Created
August 9, 2022 09:26
-
-
Save Cheranga/f35e9ed3455a3ddcc1fe219fafc05293 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Demo.Products.Api; | |
using Demo.Products.Api.Core; | |
using Demo.Products.Api.Core.Filters; | |
using Demo.Products.Api.Extensions; | |
var builder = WebApplication.CreateBuilder(args); | |
// Add services to the container. | |
builder.Services | |
.AddControllers(options => { options.Filters.Add<ApiValidationFilter>(); }) | |
.AddHybridModelBinder() | |
.RegisterValidatorsInAssembly(typeof(ModelValidatorBase<>).Assembly); | |
builder.RegisterApplicationServices(); | |
... | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment