Ban3.Infrastructures.DataPersist
1.0.13
dotnet add package Ban3.Infrastructures.DataPersist --version 1.0.13
NuGet\Install-Package Ban3.Infrastructures.DataPersist -Version 1.0.13
<PackageReference Include="Ban3.Infrastructures.DataPersist" Version="1.0.13" />
paket add Ban3.Infrastructures.DataPersist --version 1.0.13
#r "nuget: Ban3.Infrastructures.DataPersist, 1.0.13"
// Install Ban3.Infrastructures.DataPersist as a Cake Addin #addin nuget:?package=Ban3.Infrastructures.DataPersist&version=1.0.13 // Install Ban3.Infrastructures.DataPersist as a Cake Tool #tool nuget:?package=Ban3.Infrastructures.DataPersist&version=1.0.13
Ban3.cn
No site , private symbol only.
最后修改
2023-08-08 -- 检查了同步与异步的CRUD, 看起来还好
Features
- CRUD -- 同步 -- 异步
- 示例脚本
[TableIs("demo表","Demo",DbName = "UseSqlite")] public class Demo : BaseEntity { [FieldIs(ColumnIndex = 1,Increment=true,ColumnName = "Id",Key=true,NotForInsert = true,NotForUpdate = true)] public int Id { get; set; }
[FieldIs(ColumnIndex = 2,ColumnName = "Subject",SupportSearch = true)]
public string Subject { get; set; }
[FieldIs(ColumnIndex = 3, ColumnName = "Note", SupportSearch = true)]
public string Note { get; set; }
[FieldIs(ColumnIndex =11, ColumnName = "UpdateTime")]
public DateTime UpdateTime { get; set; }
[FieldIs(ColumnIndex = 12, ColumnName = "CreateTime",NotForUpdate = true)]
public DateTime CreateTime { get; set; }
}
var x = new Demo { Id = 1, Subject = "THIS IS SUBJECT", Note = "I'm Note.", UpdateTime = DateTime.Now, CreateTime = DateTime.Now };
var y=x.Create();
//var a = await x.CreateAsync(); //(a.Id + "").WriteColorLine(ConsoleColor.Red);
var r158 = new Demo { Id = 124158 }.Retrieve(); r158.ObjToJson().WriteColorLine(ConsoleColor.DarkBlue);
y.UpdateTime = DateTime.Now; Console.WriteLine($"{r158.Update()} affected.");
var r1 = new Demo { Id = 124156 }.Delete(); Console.WriteLine(r1 + "affected");
var r2 = new Demo().Delete("Id<=10000"); Console.WriteLine(r2 + "affected");
etc.
License
WTFPL
Keep it simple, stupid!
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 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 was computed. net462 was computed. 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. |
-
.NETStandard 2.0
- Ban3.Infrastructures.Common (>= 1.0.15)
- log4net (>= 2.0.15)
- Microsoft.Data.Sqlite (>= 7.0.10)
- MySql.Data (>= 8.1.0)
- Newtonsoft.Json (>= 13.0.3)
- System.Data.SqlClient (>= 4.8.5)
- System.Reflection (>= 4.3.0)
- System.Reflection.Context (>= 7.0.0)
- System.Reflection.DispatchProxy (>= 4.7.1)
- System.Reflection.Emit (>= 4.7.0)
- System.Reflection.Emit.ILGeneration (>= 4.7.0)
- System.Reflection.Emit.Lightweight (>= 4.7.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.