CoreWork.NoSQL 1.0.16

There is a newer version of this package available.
See the version list below for details.
dotnet add package CoreWork.NoSQL --version 1.0.16                
NuGet\Install-Package CoreWork.NoSQL -Version 1.0.16                
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="CoreWork.NoSQL" Version="1.0.16" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CoreWork.NoSQL --version 1.0.16                
#r "nuget: CoreWork.NoSQL, 1.0.16"                
#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 CoreWork.NoSQL as a Cake Addin
#addin nuget:?package=CoreWork.NoSQL&version=1.0.16

// Install CoreWork.NoSQL as a Cake Tool
#tool nuget:?package=CoreWork.NoSQL&version=1.0.16                
//MODEL

public class Product : INoSqlModel
{
    [BsonId]
    [BsonRepresentation(BsonType.String)]
    public string Id { get; set; }

    [BsonElement("Name")]
    public string BookName { get; set; }

    public decimal Price { get; set; }

    public string Category { get; set; }

    public string Author { get; set; }
}

//CONTROLLER

[ApiController]
[Route("[controller]/[action]")]
public class CacheController : AppControllerBase
{
    private readonly NoSqlService db;

    public CacheController(IHttpContextAccessor httpContextAccessor, NoSqlService db) : base(httpContextAccessor)
    {
        this.db = db;
    }

    [HttpGet]
    [ActionName("get")]
    public Product Get(string id)
    {
        return db.Get<Product>(id);
    }


    [HttpGet]
    [ActionName("insert")]
    public Product Insert(string author, string bookName, string category, string id, decimal price)
    {
        return db.Create(new Product
        {
            Id = id,
            Author = author,
            BookName = bookName,
            Category = category,
            Price = price
        });
    }

    [HttpGet]
    [ActionName("update")]
    public Product Update(string author, string bookName, string category, string id, decimal price)
    {
        db.Update(id, new Product
        {
            Id = id,
            Author = author,
            BookName = bookName,
            Category = category,
            Price = price
        });

        return Get(id);
    }

    [HttpGet]
    [ActionName("remove")]
    public void Remove(string id)
    {
        db.Remove<Product>(id);
    }

}

//appsetting.json
{  
  "NoSqlDatabaseSettings": {
    "ConnectionString": "",
    "DatabaseName": ""
  },
  "AllowedHosts": "*"
}

//startup.cs

services.AddNoSql(configuration);

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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 Framework net452 is compatible.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 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.21 274 11/7/2023
1.0.20 162 10/5/2023
1.0.19 184 8/21/2023
1.0.18 277 2/22/2023
1.0.17 387 12/4/2022
1.0.16 425 9/21/2022
1.0.15 430 9/21/2022
1.0.14 436 9/15/2022
1.0.13 450 8/20/2022
1.0.12 423 8/17/2022
1.0.11 412 8/17/2022
1.0.10 412 8/16/2022
1.0.9 435 8/10/2022
1.0.8 427 8/10/2022
1.0.7 413 8/10/2022
1.0.6 425 8/10/2022
1.0.5 415 8/10/2022
1.0.4 423 8/7/2022
1.0.3 425 8/7/2022
1.0.2 449 4/28/2022
1.0.1 467 4/21/2022
1.0.0 468 4/19/2022