CoreWork.NoSQL
1.0.4
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package CoreWork.NoSQL --version 1.0.4
NuGet\Install-Package CoreWork.NoSQL -Version 1.0.4
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.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CoreWork.NoSQL --version 1.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CoreWork.NoSQL, 1.0.4"
#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.4 // Install CoreWork.NoSQL as a Cake Tool #tool nuget:?package=CoreWork.NoSQL&version=1.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
//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 | Versions 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- Microsoft.Extensions.Configuration.Abstractions (>= 6.0.0)
- Microsoft.Extensions.Options (>= 6.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 6.0.0)
- Microsoft.Extensions.PlatformAbstractions (>= 1.1.0)
- MongoDB.Driver (>= 2.17.1)
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 | 275 | 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 |