dotnet-data/PoweredSoft.Data.EntityFrameworkCore/ServiceCollectionExtensions.cs

21 lines
737 B
C#
Raw Normal View History

2018-11-23 02:22:05 -05:00
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
2018-11-23 02:22:05 -05:00
using PoweredSoft.Data.Core;
using System;
using System.Collections.Generic;
using System.Text;
namespace PoweredSoft.Data.EntityFrameworkCore
{
public static class ServiceCollectionExtensions
{
public static IServiceCollection AddPoweredSoftEntityFrameworkCoreDataServices(this IServiceCollection services)
2018-11-23 02:22:05 -05:00
{
services.AddPoweredSoftDataServices();
services.TryAddTransient<IDbContextFactoryProvider, DbContextFactoryProvider>();
services.TryAddTransient<IAsyncQueryableHandlerService, AsyncQueryableHandlerService>();
2018-11-23 02:22:05 -05:00
return services;
}
}
}