Table of Contents

Configurations All you can change on JJ MasterData

How to configure?

There are three ways to configure an application:

1) Add your configuration keys in appsettings.json. On .NET Framework you will need to add IConfiguration via Microsoft.Extensions.Configuration

Tip

To autocomplete with JJMasterData keys in your text editor, put this URL in the JSON Schema of your IDE. (https://raw.githubusercontent.com/JJConsulting/JJMasterData/main/jjmasterdata.json

>> Example appsettings.json (click to expand)
{
  "AllowedHosts": "*",
  "JJMasterData": {
    "ConnectionStrings": {
      "ConnectionString": "data source=data source=localhost;initial catalog=JJMasterData;Integrated Security=True"
    },
    "DataDictionaryTableName": "tb_masterdata",
    "LocalizationTableName": "tb_masterdata_localization",
    "ReadProcedurePattern": "{tablename}Get",
    "WriteProcedurePattern": "{tablename}Set"
  },
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning"
    }
  }
}

2) Custom Action<MasterDataWebOptions> at application startup

builder.Services.AddJJMasterDataWeb(options =>
{
    options.ConnectionString = "data source=localhost;initial catalog=JJMasterData;Integrated Security=True";
});

3) By custom IConfiguration sources

//Any IConfiguration sources
builder.Configuration.AddXmlFile("my_custom_source.xml");

//That simple
builder.Services.AddJJMasterDataWeb();

What to configure?

MasterData Options You can change any property from:

Localization

app.UseJJMasterDataWeb(options =>
{
    options.AdditionalCultures.Add(new CultureInfo("es-AR"));
});

Read more about localization.