Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

ShippingMethodCountryMappingBuilder.cs

using FluentMigrator.Builders.Create.Table;
using Nop.Core.Domain.Directory;
using Nop.Core.Domain.Shipping;
using Nop.Data.Extensions;

namespace Nop.Data.Mapping.Builders.Shipping;

/// 
/// Represents a shipping method country mapping entity builder
/// 
public partial class ShippingMethodCountryMappingBuilder : NopEntityBuilder
{
    #region Methods

    /// 
    /// Apply entity configuration
    /// 
    /// Create table expression builder
    public override void MapEntity(CreateTableExpressionBuilder table)
    {
        table
            .WithColumn(NameCompatibilityManager.GetColumnName(typeof(ShippingMethodCountryMapping), nameof(ShippingMethodCountryMapping.ShippingMethodId)))
            .AsInt32().PrimaryKey().ForeignKey()
            .WithColumn(NameCompatibilityManager.GetColumnName(typeof(ShippingMethodCountryMapping), nameof(ShippingMethodCountryMapping.CountryId)))
            .AsInt32().PrimaryKey().ForeignKey();
    }

    #endregion
}