Add-Migration error: Object reference not set to an instance of an object
问题 I'm using code-first concept and just tried adding a new class to the Models folder in hope to create a new table in SQL server database. i've added Public Overridable Property Diagnosis As DbSet(Of Diagnosis) in the DBContext.vb. Then in the package manager console, i entered Add-Migration Diagnosis. But below error comes out. Why is this? Can anyone help me out please? Object reference not set to an instance of an object. Full error in Package Manager Console: System.NullReferenceException: