39 lines
1.1 KiB
C#
39 lines
1.1 KiB
C#
using Microsoft.EntityFrameworkCore;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace SafeBagDE70.Model
|
|
{
|
|
internal class CDMDbContext:DbContext
|
|
{
|
|
public DbSet<History> Histories { get; set; }
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
{
|
|
optionsBuilder.UseSqlServer("Server=.\\SQLEXPRESS;Database=CDMLOCAL;User Id=cdm;Password=Navis@123;Trusted_Connection=False;TrustServerCertificate=True");
|
|
}
|
|
}
|
|
public class History
|
|
{
|
|
[Key]
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
public int Id { get; set; }
|
|
|
|
public DateTime? DepositTime { get; set; }
|
|
|
|
public string UserCode { get; set; }
|
|
|
|
public string Data { get; set; }
|
|
|
|
public bool? IsSent { get; set; }
|
|
|
|
public DateTime? SyncTime { get; set; }
|
|
|
|
public string Status { get; set; }
|
|
}
|
|
}
|