0

While mapping class to table,one of property is not found in table but it is define in configuration:

configuration.HasProperty(x => x.CanEdit).HasFieldName("_canEdit").WithDataAccessKind(DataAccessKind.ReadWrite).ToColumn("canEdit").IsNullable().HasColumnType("bit").HasPrecision(0).HasScale(0).HasDefaultValue();

So when I'm trying to get data "Invalid column name 'canEdit'. Statement(s) could not be prepared." how to resolve.

1 Answers1

0

The property should also be added in the POCO class. Only adding it to the mapping is not sufficient.

Add a public bool? canEdit property with a private bool? _canEdit

manman
  • 4,743
  • 3
  • 30
  • 42
Lextendo
  • 33
  • 8