CodedThought.Core.Data.ApiServer 10.0.0.1

dotnet add package CodedThought.Core.Data.ApiServer --version 10.0.0.1
                    
NuGet\Install-Package CodedThought.Core.Data.ApiServer -Version 10.0.0.1
                    
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="CodedThought.Core.Data.ApiServer" Version="10.0.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CodedThought.Core.Data.ApiServer" Version="10.0.0.1" />
                    
Directory.Packages.props
<PackageReference Include="CodedThought.Core.Data.ApiServer" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CodedThought.Core.Data.ApiServer --version 10.0.0.1
                    
#r "nuget: CodedThought.Core.Data.ApiServer, 10.0.0.1"
                    
#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.
#:package CodedThought.Core.Data.ApiServer@10.0.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CodedThought.Core.Data.ApiServer&version=10.0.0.1
                    
Install as a Cake Addin
#tool nuget:?package=CodedThought.Core.Data.ApiServer&version=10.0.0.1
                    
Install as a Cake Tool

CodedThought.Core.Data.ApiServer

A .NET Core Data Entity Provider for REST APIs.

Requirements

ApiServer requires CodedThough.Core.Configuration and CodedThought.Core. These can be found in NuGet. - CodedThought.Core.Configuration - CodedThought.Core

Usage

  1. Install required packages. See requirements above.
  2. Add the Api Connection settings in the appSetting.json or a custom .json file.

    Note: See CodedThought.Core.Configuration for JSON configuration specifications.

  3. Add a new class and inherit from CodedThough.Core.Data.GenericApiDataStoreController. Below is a sample class file.
    [ApiController]
    [Route("api/[controller]/[action]")]
    [Produces("application/json")]
    public class AppApiController : GenericApiDataStoreController {

        public AppApiController(IMemoryCache cache, CodedThough.Core.Configuration.ConnectionSetting connectionSetting){
           try{
                DataStore = new GenericApiDataStore(cache, connectionSetting)   
           } catch {
               throw;
           }
        }
            
        public async Task<ApiResponse<Person>> GetPeople(string email) {
            try {
                ParameterCollection param = DataStore.CreateParameterCollection();
                param.AddApiParameter(DataStore.GetApiParameterNameFromProperty<Person>("EmailAddress"), email);
                ApiResponse<Person> response = await DataStore.Get<ApiResponse<Person>, Person>(action: "person", param);
                return response;
            } catch {
                throw;
            }
        }
    }
    ///<summary>
    /// Generic response class to accept the data or value response, any message, 
    /// and status code for the call.
    ////</summary>
    public class ApiResponse<T>{
        public List<T> Data { get; set; }
        public object? Value { get; set; }
        public string? Message { get; set; }
        public HttpStatusCode StatusCode { get; set; }
    
        public ApiResponse(){
            Data = new List<T>();
            Value = null;
            StatusCode = HttpStatusCode.OK;
        }
        public ApiResponse(List<T> data, string? message){
            Data = data;
            Message = message;
            Value = null;
        }
    } 
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows 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
10.0.0.1 41 10/22/2026
2.0.0.12 555 8/29/2025
2.0.0.11 623 3/26/2025
2.0.0.9 269 3/21/2025
2.0.0.7 295 12/11/2024
2.0.0.6 288 11/20/2024
2.0.0.5 253 11/7/2024
2.0.0.4 243 11/6/2024
2.0.0.3 334 8/29/2024
2.0.0.2 200 8/27/2024
2.0.0.1 278 6/13/2024
1.0.1 298 4/1/2024
1.0.0.4 386 11/8/2023

Retargeted to net10.0 and removed the data store, controller and configuration types that duplicated those already published by CodedThought.Core.