NotMapped seem not run on v3.1

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 years ago
I add this property to customer class but an error occour...
System.Data.SqlClient.SqlException: Invalid column name 'FullName'.'

        [NotMapped]
        public virtual string FullName
        {
            get
            {
                return (this.FirstName + " " + this.LastName).Trim();
            }
        }
3 years ago
You can use _customerService.GetCustomerFullName(customer)
or at least have a look at how it works
3 years ago
not sure if you mean nopCommerce v3.1 or Core v3.1, but in nop 4.2 there was PostConfigure method in Nop.Data\Mapping\NopEntityTypeConfiguration.cs :


        protected override void PostConfigure(EntityTypeBuilder<Customer> builder)
        {
            builder.Ignore(customer=> customer.FullName);
        }


I'm not sure how it's done in nop 4.3 yet, maybe someone else can chime in
3 years ago
possible help: https://stackoverflow.com/questions/63029625/notmapped-and-asnotracking-equivalent-in-fluentmigrator
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.