16 lines
No EOL
484 B
C#
16 lines
No EOL
484 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.Extensions.Configuration;
|
|
|
|
namespace WebApi.Helpers
|
|
{
|
|
public class SqliteDataContext : DataContext
|
|
{
|
|
public SqliteDataContext(IConfiguration configuration) : base(configuration) { }
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder options)
|
|
{
|
|
// connect to sqlite database
|
|
options.UseSqlite(Configuration.GetConnectionString("WebApiDatabase"));
|
|
}
|
|
}
|
|
} |