XT.Sql
1、使用前需要添加配置,配置对象为 XTDbConfig (支持多库切换) 2、使用时要初始化 , Services.AddSingleton(new AppSettings(builder.Environment.IsDevelopment())); Services.AddXTDbSetup(); 3、使用方式 - 注入XTDbContext,通过SimpleClient来进行操作 - 继承ISugarHandler public interface IPatCellRepository: ISugarHandler<PatCell>, IDependencyRepository { } - 继承SugarHandler public class PatCellRepository : SugarHandler<PatCell>, IPatCellRepository { public PatCellRepository(IUnitOfWork unitOfWork) : base(unitOfWork) { } } 4、数据库连接串 Oracle: DATA SOURCE=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.1)(PORT=21)))(CONNECT_DATA=(SERVICE_NAME=XX)));USER ID=XX;Password=XX PostgreSql: Host=192.168.0.1 Port=20; Database=XX; Username=XX; Password=XX; Sqlite DataSource=./test.db
Activity
- Latest release
- 1y ago
- Total releases
- 6
- Cadence
- ~2 months
- Last 12 months
- 0
Details
- First release
- Aug 10, 2023
| Version | Released | |
|---|---|---|
1.0.5
patch
|
1.0.5
patch
Dependencies (2)
|
|
1.0.4
patch
|
1.0.4
patch
Dependencies (2)
|
|
1.0.3
patch
|
1.0.3
patch
Dependencies (2)
|
|
1.0.2
patch
|
1.0.2
patch
Dependencies (2)
|
|
1.0.1
patch
|
1.0.1
patch
Dependencies (2)
|
|
1.0.0
initial
|
1.0.0
initial
Dependencies (2)
|