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); }
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")); }