WIP
This commit is contained in:
29
KTUSAPS.Data/SAPSDataContext.cs
Normal file
29
KTUSAPS.Data/SAPSDataContext.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
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)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user