![]() |
VOOZH | about |
dotnet add package EsriRestLibrary.Core --version 1.0.1
NuGet\Install-Package EsriRestLibrary.Core -Version 1.0.1
<PackageReference Include="EsriRestLibrary.Core" Version="1.0.1" />
<PackageVersion Include="EsriRestLibrary.Core" Version="1.0.1" />Directory.Packages.props
<PackageReference Include="EsriRestLibrary.Core" />Project file
paket add EsriRestLibrary.Core --version 1.0.1
#r "nuget: EsriRestLibrary.Core, 1.0.1"
#:package EsriRestLibrary.Core@1.0.1
#addin nuget:?package=EsriRestLibrary.Core&version=1.0.1Install as a Cake Addin
#tool nuget:?package=EsriRestLibrary.Core&version=1.0.1Install as a Cake Tool
This project created for easyly access to Esri Rest service in .Net Core 2
There no dependecy injection for now
So you can start to use direct in your code
EsriPointDTO.cs //It will use in your controller or bussiness logic layer
public class PointEntity
{
public int objectid { get; set; }
public int incidentid { get; set; }
public int inspectid { get; set; }
public int siteid { get; set; }
public string typdamage { get; set; }
}
Startup.cs
public void ConfigureServices(IServiceCollection services)
{
..
..
services.UseEsriRestLibraryDependencies();
..
..
}
Example Usage of WebApi
public class ValuesController : ControllerBase
{
private readonly SpatialReference _srNad1983 = new SpatialReference
{
wkt = "PROJCS[\"NAD_1983_HARN_StatePlane_Illinois_East_FIPS_1201\",GEOGCS[\"GCS_North_American_1983_HARN\",DATUM[\"D_North_American_1983_HARN\",SPHEROID[\"GRS_1980\",6378137.0,298.257222101]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"False_Easting\",984250.0],PARAMETER[\"False_Northing\",0.0],PARAMETER[\"Central_Meridian\",-88.33333333333333],PARAMETER[\"Scale_Factor\",0.999975],PARAMETER[\"Latitude_Of_Origin\",36.66666666666666],UNIT[\"Foot_US\",0.3048006096012192]]"
};
private readonly ServicesAccess _servicesAccess = new ServicesAccess
{
url = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/CommercialDamageAssessment/FeatureServer",
token = null
};
private readonly IPointService<PointEntity> _pointService;
public ValuesController(IPointService<PointEntity> pointService)
{
_pointService = new PointService<PointEntity>();
}
// GET api/values
[HttpGet]
public ActionResult<IEnumerable<string>> Get()
{
var response = _pointService.GetList(_servicesAccess, 0, "1=1", _srNad1983);
// return all objectid
return response.Select(x => x.Attributes.objectid.ToString()).ToList();
}
}
Note: If your coordinates have comma, you must to change with dot. For example: if your coordinates like x=27,1231 y=54,1312, change it like x=27.1231 y=54.1312. You can use our 'ReplaceCoordinateForCommaToDot' extension.
Usage example
x.ReplaceCoordinateForCommaToDot()
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.1 netcoreapp2.1 is compatible. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
You can use for add,update,delete feature.