Refactored Culture model to use required and non-nullable properties. Removed nullable checks for Info in ShowEnvelope.cshtml. Changed DI from Cultures to MultiCulture in _ViewImports.cshtml.
24 lines
473 B
C#
24 lines
473 B
C#
using System.Globalization;
|
|
|
|
namespace EnvelopeGenerator.Web.Models
|
|
{
|
|
public class Culture
|
|
{
|
|
private string _language = null!;
|
|
|
|
public required string Language
|
|
{
|
|
get => _language;
|
|
init
|
|
{
|
|
_language = value;
|
|
Info = new(value);
|
|
}
|
|
}
|
|
|
|
public string FIClass { get; init; } = null!;
|
|
|
|
public CultureInfo Info { get; init; } = null!;
|
|
}
|
|
}
|