First commit DB

This commit is contained in:
Thermo_SIM
2021-03-19 17:07:42 +01:00
parent cacae4eebf
commit 539ed2508d
2 changed files with 32 additions and 1 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ namespace Thermo.Active.Database
// thermo!
public DbSet<ProdInfoModel> ProdInfo { get; set; }
public DbSet<HistorySheetModel> HistorySheet { get; set; }
// Create migration string
public static string CONNECTION_STRING = "Server = " + "localhost" + "; Database=" + DATABASE_NAME + ";Uid=" + DATABASE_USER + ";Pwd=" + DATABASE_PWD + ";";
@@ -0,0 +1,31 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Thermo.Active.Model.DatabaseModels
{
[Table("HistorySheets")]
public class HistorySheetModel
{
#region Public Properties
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
[Column("DtEvent", Order = 0)]
public DateTime DtEvent { get; set; }
[Column("Recipe")]
public string RecipeName { get; set; }
[Column("FirstVal")]
public float FirstVal { get; set; }
[Column("SecondVal")]
public float SecondVal { get; set; }
[Column("ThirdVal")]
public float ThirdVal { get; set; }
#endregion Public Properties
}
}