-3
A
回答
1
您在構造函數中缺少大括號,您的第一條錯誤消息告訴您。將其更改爲:
public UniContext() : base("UniContext") { }
其次,它看起來像所有的模型類都被限定在項目的內部,但您試圖使該上下文公開。所以你試圖暴露內部的對象。將上下文更改爲internal
或private
或將模型設爲「公開」。
+0
非常感謝。我仍然工作。 :) –
相關問題
- 1. Karma - base path not working properly
- 2. Magento - Base table or view not found
- 3. ActiveRecord :: Base before_validation with conditional not triggered
- 4. Spring MVC - Base View
- 5. Base Internationalization and「Could not find a storyboard named [...]」
- 6. ASP.NET MVC - 數據庫視圖爲DbSet?
- 7. 。 DbSet
- 8. Spring MVC 404 Not Found
- 9. MVC Controller not firing
- 10. EntityFramework 4,DbSet和ObjectContext
- 11. Spring MVC Resources not refreshing
- 12. MVC DoddleReports 404 Not Found
- 13. ASP.NET MVC RequireHttps not available
- 14. MVC 5 javascript not firing
- 15. route not mapping mvc 3
- 16. MVC BeginForm not reach Controller
- 17. 無法迭代dbset
- 18. ASP.NET MVC中的繼承和BASE類
- 19. 反射+ Linq + DbSet
- 20. Spring MVC&JSON - 406 Not Acceptable @Responsebody
- 21. Object Base Domain Not Allowed:試圖實現Facebook時出錯像按鈕
- 22. Asp.Net MVC 3 App HandleError not working
- 23. ASP .net MVC List not updating
- 24. Html.ClientValidation does not work on mvc
- 25. Asp.net MVC recaptcha set language not working
- 26. asp.net mvc 2 model not from db
- 27. MVC 4 @Scripts「does not exist」
- 28. MVC Model not binding to HTTPPost action
- 29. jquery ui popup MVC 3 not firing
- 30. MVC Not Loading完整視圖
您在構造函數中缺少大括號,您的第一條錯誤消息告訴您。 – DavidG
此外,請發佈代碼,而不是代碼圖片。 – DavidG