mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 10:42:52 +08:00
-增加HttpClientFatory
This commit is contained in:
parent
bb1dcee350
commit
71beabf8b4
25
Providers/FreeSql.Provider.QuestDb/QuestDbContainer.cs
Normal file
25
Providers/FreeSql.Provider.QuestDb/QuestDbContainer.cs
Normal file
@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace FreeSql.Provider.QuestDb
|
||||
{
|
||||
internal class QuestDbContainer
|
||||
{
|
||||
private static IServiceCollection Services;
|
||||
public static IServiceProvider ServiceProvider { get; private set; }
|
||||
|
||||
internal static void Initialize(Action<IServiceCollection> service)
|
||||
{
|
||||
Services = new ServiceCollection();
|
||||
service?.Invoke(Services);
|
||||
ServiceProvider = Services.BuildServiceProvider();
|
||||
}
|
||||
|
||||
internal static T GetService<T>()
|
||||
{
|
||||
return ServiceProvider.GetService<T>();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user