Webiant Logo Webiant Logo
  1. No results found.

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

PollBuilder.cs

using FluentMigrator.Builders.Create.Table;
using Nop.Core.Domain.Localization;
using Nop.Core.Domain.Polls;
using Nop.Data.Extensions;

namespace Nop.Data.Mapping.Builders.Polls;

/// 
/// Represents a poll entity builder
/// 
public partial class PollBuilder : NopEntityBuilder
{
    #region Methods

    /// 
    /// Apply entity configuration
    /// 
    /// Create table expression builder
    public override void MapEntity(CreateTableExpressionBuilder table)
    {
        table
            .WithColumn(nameof(Poll.Name)).AsString(int.MaxValue).NotNullable()
            .WithColumn(nameof(Poll.LanguageId)).AsInt32().ForeignKey();
    }

    #endregion
}