4.3 extending data access layer (not plugin)

3 months ago
In 4.2 when modifying the base code we were able to extend a mapping class, but keep the code in a separate folder/class file, for logical  grouping of customisation code such as


namespace Nop.Data.Mapping.Catalog
{
    public partial class CategoryMap : NopEntityTypeConfiguration<Category>
    {

        #region Methods

        /// <summary>
        /// Configures the entity
        /// </summary>
        /// <param name="builder">The builder to be used to configure the entity</param>
        protected override void PostConfigure(EntityTypeBuilder<Category> builder)
        {
            builder.Property(category => category.MyNewProperty).IsRequired(false);
        }

        #endregion

    }
}



Can I achieve the same code separation with NopEntityBuilder<DOMAINCLASS> ? Is there the equivalent to 'Configure' and 'PostConfigure' pattern with Linq2db?
1 month ago
Starting from version 4.30, we decided to use migrations for these purposes, a detailed description of the method for extending existing entities is in our documentation


JonQuick wrote:


...

Can I achieve the same code separation with NopEntityBuilder<DOMAINCLASS> ? Is there the equivalent to 'Configure' and 'PostConfigure' pattern with Linq2db?