mirror of
https://github.com/dotnetcore/AgileConfig.git
synced 2026-10-22 23:39:55 +08:00
18 lines
536 B
C#
18 lines
536 B
C#
using Microsoft.Extensions.DependencyInjection;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace AgileConfig.Server.Data.Freesql
|
|
{
|
|
public static class ServiceCollectionExt
|
|
{
|
|
public static void AddFreeSqlDbContext(this IServiceCollection sc)
|
|
{
|
|
sc.AddFreeDbContext<FreeSqlContext>(options => options.UseFreeSql(FreeSQL.Instance));
|
|
//sc.AddSingleton<IFreeSql>(FreeSQL.Instance);
|
|
//sc.AddScoped<FreeSqlContext, FreeSqlContext>();
|
|
}
|
|
}
|
|
}
|