Newer
Older
CRUDTask / Catalog / ConfigureServices.cs
@Derek Comartin Derek Comartin on 29 Dec 2021 592 bytes Init
using System.Runtime.CompilerServices;
using MediatR;
using Microsoft.Extensions.DependencyInjection;

namespace Catalog
{
    public static class ConfigureServices
    {
        public static void ConfigureCatalogServices(this IServiceCollection collection)
        {
            collection.AddDbContext<CatalogDbContext>();
            collection.AddMediatR(typeof(ConfigureServices).Assembly);
        }

        public static void AddCatalogControllers(this IMvcBuilder mvcBuilder)
        {
            mvcBuilder.AddApplicationPart(typeof(ConfigureServices).Assembly);
        }
    }
}