using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using MinimalAPIDemo.Models;

namespace MinimalAPIDemo.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class SalesOrgController : ControllerBase
    {
        [HttpGet]
        public async Task<IActionResult> Get()
        {
            var salesOrgs = new List<SalesOrg>
            {
                new SalesOrg  { ID = 1, Name = "TestName1", Code = "TestCode1" },
                new SalesOrg  { ID = 2, Name = "TestName2", Code = "TestCode2" },
                new SalesOrg  { ID = 3, Name = "TestName3", Code = "TestCode3" }
            };

            return Ok(salesOrgs);

        }

    }
}
