Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
512 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
Properties added in partial classes are recognized with EF6. With EF Core 6.0, there is no error when compiling, but an error occurs when loading data, new properties are not recognized.
As a workaround, we moved the new properties into a class with inheritance. This is more academic but induces a long code review.
public partial class Contacts
{
public bool IsSelect {get; set;}
........................
}
Error loading: IsSelect is not recognized
public class ContactsExtend : Contacts
{
public bool IsSelect {get; set;}
}
No error
Solution :
using System.ComponentModel.DataAnnotations.Schema;
public partial class Contacts
{
[NotMapped]
public bool? IsChecked { get; set; }