using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Text.Json; using System.Text.Json.Serialization; using System.Threading.Tasks; namespace EF_ChangeLog.Model { internal class Stock { public int Id { get; set; } public string Name { get; set; } public decimal Price { get; set; } [NotMapped] public string OriginalSnapshot { get; set; } public void SaveSnapshot() { this.OriginalSnapshot = JsonSerializer.Serialize(this); } } }