2024-10-30 17:52:22 +08:00
|
|
|
|
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using SiteManagementSystem_SoftwareEngineering_.Entity;
|
|
|
|
|
|
|
|
|
|
namespace SiteManagementSystem_SoftwareEngineering_.Service
|
|
|
|
|
{
|
|
|
|
|
public class SQLService : DbContext
|
|
|
|
|
{
|
|
|
|
|
public SQLService(DbContextOptions<SQLService> options)
|
|
|
|
|
: base(options)
|
|
|
|
|
{
|
|
|
|
|
Database.EnsureCreated();
|
|
|
|
|
}
|
|
|
|
|
public DbSet<User> Users { get; set; }
|
2024-11-03 11:21:47 +08:00
|
|
|
|
public DbSet<Field> Fields { get; set; }
|
2024-11-04 22:26:45 +08:00
|
|
|
|
public DbSet<FieldRecord> UserFieldRecords{get;set;}
|
2024-10-30 17:52:22 +08:00
|
|
|
|
}
|
|
|
|
|
}
|