예제 #1
0
        public IActionResult GetMetadatasByNatureAreaLocalIds([FromBody] LocalIdRequest localIdRequest)
        {
            var metadatas = SqlServer.GetMetadatasByNatureAreaLocalIds(localIdRequest.LocalIds.ToList(), true);

            var metadatasJson = JsonConvert.SerializeObject(metadatas, jsonSerializerSettings);
            var contentResult = new NinJsonResult(metadatasJson);

            return(contentResult);
        }
예제 #2
0
        public FileStreamResult ExportNatureAreasByLocalIds([FromBody] LocalIdRequest localIdRequest)
        {
            var metadatas = SqlServer.GetMetadatasByNatureAreaLocalIds(localIdRequest.LocalIds.ToList(), true);
            var xDocument = xmlConverter.ToXml(metadatas);

            Stream xmlStream = new MemoryStream();

            xDocument.Save(xmlStream);
            xmlStream.Position = 0;

            return(new FileStreamResult(xmlStream, "application/xml"));
        }