Asp.net – How do I declare the CreatedBy field to be null for serialization but non null for database?ll
In my server, my field "Name" is marked as [Required] so EntityFramework can mark it as non nullable on the migration: public class MyClass { [Required] public string? CreatedBy {get;set;} } But the "CreatedBy" field is set at creation on…