我正在使用带有实体框架的MVC,我有一张桌子可以跟踪酒店氛围中的每日活动。这些事件每天都在变化,例如谁清理房间和清洁时间。该表很好,但我想做的是每天保存一份表格。我在这个论坛中读过,序列化表条目列表不是一个好主意(How to store a list in a column of a database table)。如果不使用表条目列表,如何每天保存表数据?
这是我的单位类/表
public class Units
{
[Key]
[Required]
public int UnitId { get; set; }
public int UnitNumber { get; set; }
public string UnitType { get; set; }
public string Status { get; set; }
public bool Checkout { get; set; }
public bool isEmpty { get; set; }
public Employees Housekeeper { get; set; }
public DateTime? CleanStart { get; set; }
public DateTime? CleanEnd { get; set; }
public bool isClean { get; set; }
public Employees Laundry { get; set; }
public DateTime? LaundryTime { get; set; }
public bool isLaundry { get; set; }
public Employees QualityControl { get; set; }
public DateTime? QCStart { get; set; }
public DateTime? QCEnd { get; set; }
public bool isQC { get; set; }
public Employees Maintenance { get; set; }
public DateTime? MaintStart { get; set; }
public DateTime? MaintEnd { get; set; }
public bool isMaint { get; set; }
public string Comments { get; set; }
public string Color { get; set; }
}