You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
630 B

  1. using HKCardOUT.Helper;
  2. using SqlSugar;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace HKCardOUT.Logic
  9. {
  10. public class DbContext
  11. {
  12. public static SqlSugarScope Context = new(new ConnectionConfig()
  13. {
  14. ConnectionString = DataBus.ConnectionString,//连接符字串
  15. DbType = DbType.Sqlite,//数据库类型
  16. IsAutoCloseConnection = true //不设成true要手动close
  17. }, db =>
  18. {
  19. db.Aop.OnLogExecuting = (sql, pars) =>
  20. {
  21. };
  22. });
  23. }
  24. }