임현대수석님 건의사항 적용.

This commit is contained in:
chi
2021-05-31 13:37:27 +09:00
parent ba02049737
commit 6590694e8b
15 changed files with 463 additions and 71 deletions

View File

@@ -0,0 +1,34 @@
using Newtonsoft.Json.Linq;
using System;
using System.Linq;
using System.Net.Http;
using System.Web.Http;
namespace WebServer
{
public class CommonController : BaseController
{
[HttpGet]
public HttpResponseMessage List()
{
var db = new EEEntities();
var liast = db.Common.Where(t => t.gcode == "EET1P").OrderBy(t => t.code).ToArray();
//System.Web.Http.Results.JsonResult<string>
var json = JObject.FromObject(liast);
return new HttpResponseMessage()
{
Content = new StringContent(
json.ToString(),
System.Text.Encoding.UTF8,
"application/json")
};
}
}
}