Код: Выделить всё
public class CustomSection
{
public int A {get;set;}
public int B {get;set;}
}
//In Startup.cs
services.Configure(Configuration.GetSection("CustomSection"));
//Inject an IOptions instance
public HomeController(IOptions options)
{
var settings = options.Value;
}
Код: Выделить всё
"MobileConfigInfo": {
"appointment-confirmed": "We've booked your appointment. See you soon!",
"appointments-book": "New Appointment",
"appointments-null": "We could not locate any upcoming appointments for you.",
"availability-null": "Sorry, there are no available times on this date. Please try another."
}
Подробнее здесь: https://stackoverflow.com/questions/428 ... n-net-core
Мобильная версия