1234567891011121314 |
- using Microsoft.Extensions.DependencyInjection;
- using Microsoft.Extensions.Options;
- namespace api.Database
- {
- public static class LiteDbServiceExtension
- {
- public static void AddLiteDb(this IServiceCollection services, string databasePath)
- {
- services.AddTransient<LiteDbContext, LiteDbContext>();
- services.Configure<LiteDbConfig>(options => options.DatabasePath = databasePath);
- }
- }
- }
|