20 lines
653 B
C#
20 lines
653 B
C#
using Microsoft.Extensions.DependencyInjection;
|
|
using Microsoft.Extensions.DependencyInjection.Extensions;
|
|
using PoweredSoft.Data.Core;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace PoweredSoft.Data.EntityFrameworkCore
|
|
{
|
|
public static class ServiceCollectionExtensions
|
|
{
|
|
public static IServiceCollection AddPoweredSoftDataServices(this IServiceCollection services)
|
|
{
|
|
services.TryAddTransient<IDbContextFactoryProvider, DbContextFactoryProvider>();
|
|
services.TryAddTransient<IAsyncQueryableFactory, AsyncQueryableFactory>();
|
|
return services;
|
|
}
|
|
}
|
|
}
|