StarMongoDbHelper 23.8.29
See the version list below for details.
dotnet add package StarMongoDbHelper --version 23.8.29
NuGet\Install-Package StarMongoDbHelper -Version 23.8.29
<PackageReference Include="StarMongoDbHelper" Version="23.8.29" />
paket add StarMongoDbHelper --version 23.8.29
#r "nuget: StarMongoDbHelper, 23.8.29"
// Install StarMongoDbHelper as a Cake Addin #addin nuget:?package=StarMongoDbHelper&version=23.8.29 // Install StarMongoDbHelper as a Cake Tool #tool nuget:?package=StarMongoDbHelper&version=23.8.29
基于MongoDB.Entities的MongoDB数据库辅助类,封装了常用方法: 获取列表数据:db.List("users",JObject.FromObject({page:1,psize:1000,filter:JSON.stringify({"_id":id}),fields:JSON.stringify(['_id'])})).Result 获取单条数据:db.Get("users","xxxxxxx",fields).Result 通过过滤条件获取一条数据:db.GetOne("users",JObject.FromObject({username:'yyfs'}),fields).Result 新增修改数据:db.Save('users',JObject.FromObject(data),ret.optuser).Result 更新单条数据:db.UpdateOne("users",JObject.FromObject({username:'yyfs'}),JObject.FromObject({status:0}),ret.optuser).Result; 更新数据:db.Update("users",xxxxxxxx“”,JObject.FromObject({status:0}),ret.optuser).Result; 根据条件批量更新数据:db.UpdateMany("users",JObject.FromObject({status:0}),JObject.FromObject({status:1}),ret.optuser).Result; var data=[ { $match: { "id":id }}, { $unwind: "$cost" }, { $group : { _id : "$_id", //必须是_id cost: { $sum : "$cost"} //cost 可以是任意值 } } ]; 聚合查询: db.aggregate('users',true,data).Result; 创建删除索引:db.CreateDbIndex("users","abc",[{"a":"aaa"},{"b":"bbb"}]) db.DropDbIndex("users","abc")
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. 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 is compatible. 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 Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 is compatible. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.1
- MongoDB.Entities (>= 21.0.2)
- Newtonsoft.Json (>= 13.0.3)
-
.NETFramework 4.6.2
- MongoDB.Entities (>= 21.0.2)
- Newtonsoft.Json (>= 13.0.3)
-
.NETStandard 2.0
- MongoDB.Entities (>= 21.0.2)
- Newtonsoft.Json (>= 13.0.3)
-
net5.0
- MongoDB.Entities (>= 21.0.2)
- Newtonsoft.Json (>= 13.0.3)
-
net6.0
- MongoDB.Entities (>= 21.0.2)
- Newtonsoft.Json (>= 13.0.3)
-
net7.0
- MongoDB.Entities (>= 21.0.2)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.