using DevExtreme.AspNet.Data; using DevExtreme.AspNet.Mvc; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using OSS.Models; using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http; using System.Net.Http.Formatting; using System.Web.Http; namespace Onestopshop.Controllers { [Route("api/DataCleaningAPI/{action}", Name = "DataCleaningAPI")] public class DataCleaningApiController : ApiController { private OSSDBContext myContext = new OSSDBContext(); [HttpGet] public HttpResponseMessage GetDirtyData(DataSourceLoadOptions loadOptions) { return Request.CreateResponse(DataSourceLoader.Load(myContext.ProjectProfilesExternal, loadOptions)); } [HttpGet] public HttpResponseMessage GetRegion(DataSourceLoadOptions loadOptions) { return Request.CreateResponse(DataSourceLoader.Load(myContext.Regions, loadOptions)); } [HttpGet] public HttpResponseMessage GetDistrict(DataSourceLoadOptions loadOptions) { return Request.CreateResponse(DataSourceLoader.Load(myContext.Districts, loadOptions)); } [HttpGet] public HttpResponseMessage GetCountry(DataSourceLoadOptions loadOptions) { return Request.CreateResponse(DataSourceLoader.Load(myContext.Countries, loadOptions)); } [HttpGet] public HttpResponseMessage GetCompanyProfile(DataSourceLoadOptions loadOptions) { return Request.CreateResponse(DataSourceLoader.Load(myContext.CompanyProfileExternal, loadOptions)); } } }