Storing custom class property like String via OnModelCreating of DBContext .Net Core
问题 I have two classes in .Net Core The class Owner namespace CustomStoreDatabase.Models { public class Owner { public string OwnerId { get; set; } public DateTime MinDateTime { get; set; } public DateTime MaxDateTime { get; set; } public TimeSpan Interval { get; set; }//store like a double public Ownership Ownership { get; set; } //store like a JSON String in the db } } And the class Ownership namespace CustomStoreDatabase.Models { public class Ownership { public string OwnershipId { get; set; }