30 lines
796 B
C#
30 lines
796 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace KTUSAPS.Data
|
|
{
|
|
public class SAPSDataContext : DbContext
|
|
{
|
|
public SAPSDataContext() : base() { }
|
|
public SAPSDataContext(DbContextOptions options) : base(options) { }
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
|
|
}
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
{
|
|
if (!optionsBuilder.IsConfigured)
|
|
{
|
|
optionsBuilder.UseMySql("Server=localhost;User=samokdev;Password=;Database=samok_dev", new MariaDbServerVersion(new Version(10, 6, 3)));
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|