0
[Display(Name = "Mobile")]
public string Mobile { get; set; }
在上面的代碼中,我想包括像...實體框架代碼優先可選錯誤消息
[Required(ErrorMessage="If you don't enter your email we cant send a text confirmation")]
但是,我不想做出所需要的領域。就在用戶沒有輸入任何內容時,他們會收到一條消息。這可能嗎?
感謝
你可以檢查conditin idf emailid == null然後如果你使用Windows窗體Messagebox.show(「你的消息」),否則繼續你的編碼 – 62071072SP