using Microsoft.EntityFrameworkCore; using System.Reflection; namespace Masuit.Tools.Core; public class ChangeEntry { /// /// 所属实体 /// public T Entity { get; set; } /// /// 实体类型 /// public Type EntityType { get; set; } /// /// 变更类型 /// public EntityState EntityState { get; set; } /// /// 字段变更信息 /// public List ChangeProperties { get; set; } public string ChangeDescription => ChangeProperties.Select(p => p.ChangeDescription).Join("; "); /// Returns a string that represents the current object. /// A string that represents the current object. public override string ToString() { return $"{ChangeDescription},实体:{EntityType.FullName},变更类型:{EntityState}"; } } public class ChangeEntry : ChangeEntry { }