C#实体类null自动转空字符串

using System.ComponentModel.DataAnnotations;

   [DisplayFormat(ConvertEmptyStringToNull = false)]

        public string yptype { set; get; }

原文地址:https://www.cnblogs.com/macT/p/11763522.html