dotnet-db-context/PoweredSoft.DbContext.EntityFrameworkCore/ServiceCollectionExtensions.cs

19 lines
646 B
C#
Raw Permalink Normal View History

2021-09-20 10:21:48 -04:00
using Microsoft.Extensions.DependencyInjection;
using PoweredSoft.DbContext.Core;
using System;
using System.Collections.Generic;
using System.Text;
namespace PoweredSoft.DbContext.EntityFrameworkCore
{
public static class ServiceCollectionExtensions
{
public static IServiceCollection AddPoweredSoftEntityFrameworkCoreDbContextServices(this IServiceCollection services)
{
services.AddSingleton<IQueryableService, EntityFrameworkCoreQueryableService>();
services.AddSingleton<IContextServiceFactory, EntityFrameworkCoreDbContextServiceFactory>();
return services;
}
}
}