Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PropertyBuilder<T> Does Not Contain A Definition For HasColumnType

I just built up a bunch of POCO classes and a DbContext class utilizing EntityFramework Core and the Scaffold-DbContext NuGet Package Manager Console command.

It generated a bunch of code and most of it is fine, except there are several calls to HasColumnType and HasName methods that are not found by the compiler. Unfortunately, VS2017 isn't helping me locate them either. I installed EntityFramework Core via the NuGet Package Manager and I figured all dependencies would've been correctly installed, but this does not appear to be the case. I've tried googling the namespace for HasColumnType but have been unable to find it.

Could someone please tell me what namespace or NuGet package I'm missing?

like image 550
KSwift87 Avatar asked Nov 11 '17 00:11

KSwift87


1 Answers

These extensions are in the Microsoft.EntityFrameworkCore.Relational package as they are useful for modeling relational databases.

https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.Relational/

like image 172
Chris Hutchinson Avatar answered Sep 19 '22 08:09

Chris Hutchinson