EsriRestLibrary.Core 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package EsriRestLibrary.Core --version 1.0.0                
NuGet\Install-Package EsriRestLibrary.Core -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EsriRestLibrary.Core" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EsriRestLibrary.Core --version 1.0.0                
#r "nuget: EsriRestLibrary.Core, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install EsriRestLibrary.Core as a Cake Addin
#addin nuget:?package=EsriRestLibrary.Core&version=1.0.0

// Install EsriRestLibrary.Core as a Cake Tool
#tool nuget:?package=EsriRestLibrary.Core&version=1.0.0                

EsriRestLibrary

This project created for easyly access to Esri Rest service in .Net Core 2

Usage

There no dependecy injection for now

So you can start to use direct in your code

GeoContext.cs

public class GeoContext
{
  public string Proxy { get; set; }
  public string Url { get; set; }
  public string Token { get; set; }
}

EsriPointDTO.cs //It will use in your controller or bussiness logic layer

  public class EsriPointDTO
  {
    public decimal OBJECTID { get; set; }
    public string Name { get; set; }
  }

appsettings.json

  ..
  ..
  "GeoContext": {
    "Url": "Your Feature service url",
    "Token": "if you use token based request, you can add your token",
    "Proxy": "This is your Esri Proxy url, it could be use but my recommendation is token"
  }
  ..
  ..

Startup.cs

public void ConfigureServices(IServiceCollection services)
{
  ..
  ..
  services.Configure<GeoContext>(Configuration.GetSection("GeoContext"));
  ..
  ..
}

Usage

private readonly PointService<EsriPointDTO> _pointDal;

public SampleController(IOptionsSnapshot<GeoContext> settings){
   _pointDal = new PointService<EsriPointDTO>(geoContext.Url, geoContext.Token);
}

public IActionResult Create(GeoCustomModel model){

 var addedGeo = _pointDal.Add(new EsriPointDTO { Name = model.Name },
                new EsriPoint(entity.PointX.ReplaceCommaAndDotForCoordinate(),
                    entity.PointY.ReplaceCommaAndDotForCoordinate(), new SpatialReference { wkid = 4326 }));
return View();
}

It is extension for replace comma to dot

public static string ReplaceCommaAndDotForCoordinate(this string coordinateWithComma)
{
  return coordinateWithComma.Replace(",", ".");
}
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.1 is compatible.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 805 4/22/2019
1.0.0 536 4/16/2019

You can use for add,update,delete feature.