ASPNetCore/TestAppRuna/API/SettingsController.cs

28 lines
609 B
C#
Raw Permalink Normal View History

2021-03-24 09:51:02 +00:00
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using TestAppRuna.Services;
namespace TestAppRuna.API
{
[Route("api/[controller]")]
[ApiController]
public class SettingsController : ControllerBase
{
public SettingsController(AppSettings appSettings)
{
Settings = appSettings;
}
public AppSettings Settings { get; }
[HttpGet]
public string Get()
{
return Settings.CompanyName;
}
}
}