足力健后端,使用.netcore版本,合并1个项目使用

BaseContext.cs 633B

12345678910111213141516171819202122232425
  1. using SqlSugar;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Text;
  5. namespace System.Common
  6. {
  7. public class BaseContext
  8. {
  9. public static string DB_ConnectionString { get; set; }
  10. public BaseContext()
  11. {
  12. Db = new SqlSugarClient(new ConnectionConfig()
  13. {
  14. ConnectionString = DB_ConnectionString,
  15. DbType = DbType.SqlServer,
  16. IsAutoCloseConnection = true,
  17. InitKeyType = InitKeyType.SystemTable,
  18. IsShardSameThread = true,
  19. });
  20. }
  21. public SqlSugarClient Db;
  22. }
  23. }