using System.Configuration; using FluentMigrator.Runner.Initialization; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Nop.Core.Configuration; namespace Nop.Data.Configuration; public partial class DataConfig : IConfig, IConnectionStringAccessor { /// /// Gets or sets a connection string /// public string ConnectionString { get; set; } = string.Empty; /// /// Gets or sets a data provider /// [JsonConverter(typeof(StringEnumConverter))] public DataProviderType DataProvider { get; set; } = DataProviderType.SqlServer; /// /// Gets or sets the wait time (in seconds) before terminating the attempt to execute a command and generating an error. /// By default, timeout isn't set and a default value for the current provider used. /// Set 0 to use infinite timeout. /// public int? SQLCommandTimeout { get; set; } = null; /// /// Gets or sets a value that indicates whether to add NoLock hint to SELECT statements (Reltates to SQL Server only) /// public bool WithNoLock { get; set; } = false; /// /// Gets a section name to load configuration /// [JsonIgnore] public string Name => nameof(ConfigurationManager.ConnectionStrings); /// /// Gets an order of configuration /// /// Order public int GetOrder() => 0; //display first }