/// <summary> /// Path to the JSON file that contains the initial data for the REST API. /// </summary> public static IModelConfigurationBuilder <IInMemoryModelConfiguration> HasJsonFilePath( this IModelConfigurationBuilder <IInMemoryModelConfiguration> @this, string jsonFilePath) { ExceptionHelper.ArgumentNull.ThrowIfNecessary(jsonFilePath, nameof(jsonFilePath)); @this.ModelConfiguration.JsonFilePath = jsonFilePath; return(@this); }
public static IModelConfigurationBuilder <ICustomModelConfiguration> HasCustomModelConfigurationValue( this IModelConfigurationBuilder <ICustomModelConfiguration> @this, string customModelConfigurationValue) { ExceptionHelper.ArgumentNull.ThrowIfNecessary(customModelConfigurationValue, nameof(customModelConfigurationValue)); @this.ModelConfiguration.CustomModelConfigurationValue = customModelConfigurationValue; return(@this); }
public static IModelConfigurationBuilder <ISqlModelConfiguration> HasTableName( this IModelConfigurationBuilder <ISqlModelConfiguration> @this, string tableName) { ExceptionHelper.ArgumentNull.ThrowIfNecessary(tableName, nameof(tableName)); ExceptionHelper.Argument.ThrowIfTrue(!_tableNameRegex.IsMatch(tableName), $"'{tableName}' is an invalid table name.", nameof(tableName)); @this.ModelConfiguration.TableName = tableName; return(@this); }
public void ApplySetup(IModelConfigurationBuilder provider) { provider.Entity <Project>( p => p.Filter(x => x.Id, Constants.ProjectParameter) ); }