ToTable method is not recognized

0

Contextualization

I'm starting in ASP.Net CORE and, to consolidate knowledge, I'm trying to make a small project already using this framework. However, I'm having trouble mapping my domain classes.

Problem

I added a Class Library (.NET Standard) to my solution to implement my data access layer (DataAccess).

When creating the mapping class for one of my domain classes, the AnswerPart, I noticed that the ToTable method was not listed in the EntityTypeBuilder method list and properties. In addition to the ToTable method, the HasColumnName method is also not being recognized.

IfounditstrangebecauseIhadalreadyaddedtheAspNetCore1.1.2package,asshownintheimagebelow.

I've already used EntityFramework in a project in WindowsForm. It was enough for me to add the EntityFramework package that all the properties and methods were already available. I say this not only for the ToTable method, the HasColumnName method was also enabled, which is not happening now.

I wonder if I need to add some other package, or if I forgot something basic.

Thank you!

    
asked by anonymous 04.09.2017 / 03:06

1 answer

2

Install this package:

Microsoft.EntityFrameworkCore.Relational

These methods belong to it.

    
04.09.2017 / 21:57