Open GSSBilly opened 5 years ago
明確指出"對這個檔案進行手動變更可能導致您的應用程式產生未預期的行為" 請設計 ViewModel 繼承 EF Model 並將 Data Annotation Attributes 掛在此 ViewModel 可依照實際情況增加欄位與設定 Data Annotation Attributes
https://github.com/boshiang/.NET-MVC-Workshop1/blob/79a504eadf447c8ba6b24d9401f5efdca4a57d39/Workshop2/Models/BookDataBase.cs#L1-L49
EF Model 問題
https://github.com/boshiang/.NET-MVC-Workshop1/blob/79a504eadf447c8ba6b24d9401f5efdca4a57d39/Workshop2/Models/BookDataBase.cs#L1-L49