DTI.Api
1.0.3
dotnet add package DTI.Api --version 1.0.3
NuGet\Install-Package DTI.Api -Version 1.0.3
<PackageReference Include="DTI.Api" Version="1.0.3" />
paket add DTI.Api --version 1.0.3
#r "nuget: DTI.Api, 1.0.3"
// Install DTI.Api as a Cake Addin
#addin nuget:?package=DTI.Api&version=1.0.3
// Install DTI.Api as a Cake Tool
#tool nuget:?package=DTI.Api&version=1.0.3
Use BaseApiController to create Web API controllers that return ApiResult to the caller. Works extremely well with Dapper. Works with any data that can be expressed as IEnumerable<dynamic>. Callers to you API will get consistent ApiResult structure.
public class CountiesSelectController : BaseApiController { [HttpGet] public HttpResponseMessage Get() { try { using (var connection = new SqlConnection(myConnectionString)) { return ProcessedRequest(new ApiResult { Data = connection.Query("CountiesSelect", commandType: CommandType.StoredProcedure) }); } } catch (Exception ex) { return ProcessedRequestLogException(ex); } } }
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
-
- DTI.Common (>= 1.0.1)
- Microsoft.AspNet.WebApi.Core (>= 5.2.7)
- Newtonsoft.Json (>= 12.0.1)
- System.Security.Principal.Windows (>= 4.5.0)
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 |
---|