CoreWork.NoSQL
1.0.6
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.6
NuGet\Install-Package CoreWork.NoSQL -Version 1.0.6
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.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CoreWork.NoSQL" Version="1.0.6" />
<PackageReference Include="CoreWork.NoSQL" />
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 CoreWork.NoSQL --version 1.0.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CoreWork.NoSQL, 1.0.6"
#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 CoreWork.NoSQL@1.0.6
#: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=CoreWork.NoSQL&version=1.0.6
#tool nuget:?package=CoreWork.NoSQL&version=1.0.6
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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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.
-
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.1.1 | 199 | 12/12/2024 |
1.0.21 | 320 | 11/7/2023 |
1.0.20 | 199 | 10/5/2023 |
1.0.19 | 238 | 8/21/2023 |
1.0.18 | 365 | 2/22/2023 |
1.0.17 | 460 | 12/4/2022 |
1.0.16 | 509 | 9/21/2022 |
1.0.15 | 506 | 9/21/2022 |
1.0.14 | 520 | 9/15/2022 |
1.0.13 | 539 | 8/20/2022 |
1.0.12 | 507 | 8/17/2022 |
1.0.11 | 504 | 8/17/2022 |
1.0.10 | 499 | 8/16/2022 |
1.0.9 | 510 | 8/10/2022 |
1.0.8 | 504 | 8/10/2022 |
1.0.7 | 490 | 8/10/2022 |
1.0.6 | 500 | 8/10/2022 |
1.0.5 | 492 | 8/10/2022 |
1.0.4 | 504 | 8/7/2022 |
1.0.3 | 501 | 8/7/2022 |
1.0.2 | 533 | 4/28/2022 |
1.0.1 | 554 | 4/21/2022 |
1.0.0 | 554 | 4/19/2022 |