mirror of
https://github.com/dotnetcore/AgileConfig.git
synced 2026-10-19 21:41:49 +08:00
21 lines
532 B
C#
21 lines
532 B
C#
using AgileConfig.Server.Common;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace AgileConfig.Server.Data.Repository
|
|
{
|
|
public static class ServiceCollectionExt
|
|
{
|
|
public static void AddAgileConfigDb(this IServiceCollection sc)
|
|
{
|
|
sc.AddScoped<ISqlContext, AgileConfigDbContext>();
|
|
using (var ctx = new AgileConfigDbContext())
|
|
{
|
|
ctx.InitTables();
|
|
}
|
|
}
|
|
}
|
|
}
|