13 lines
435 B
C#
13 lines
435 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace Drab.LocalDb.IoC;
|
|
|
|
public static class IocLocalDbRegister
|
|
{
|
|
public static IServiceCollection AddLocalDatabase(this IServiceCollection services, ILocalDbConfiguration localDbConfiguration)
|
|
{
|
|
services.AddDbContext<LocalDbContext>(cx => cx.UseSqlite(localDbConfiguration.ConnectionString));
|
|
return services;
|
|
}
|
|
} |