mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
25 lines
771 B
C#
25 lines
771 B
C#
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.Extensions.Configuration;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Remotely.Server.Data
|
|
{
|
|
public class SqlServerDbContext : ApplicationDbContext
|
|
{
|
|
private readonly IConfiguration _configuration;
|
|
|
|
public SqlServerDbContext(DbContextOptions<ApplicationDbContext> context, IConfiguration configuration)
|
|
: base(context)
|
|
{
|
|
_configuration = configuration;
|
|
}
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder options) =>
|
|
options.UseSqlServer(_configuration.GetConnectionString("SQLServer"));
|
|
}
|
|
}
|