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

19 lines
630 B
C#
Raw 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.EntityFramework
{
public static class ServiceCollectionExtensions
{
public static IServiceCollection AddPoweredSoftEntityFrameworkDbContextServices(this IServiceCollection services)
{
services.AddSingleton<IQueryableService, EntityFrameworkQueryableService>();
services.AddSingleton<IContextServiceFactory, EntityFrameworkDbContextServiceFactory>();
return services;
}
}
}