using SqlSugar; using SqlSugar.IOC; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using VideoAnalysisCore.Interface; using VideoAnalysisCore.Model; namespace VideoAnalysisCore.Common { public class Repository : SimpleClient where T : class, new() { public Repository() { if(typeof(T).GetInterfaces().Contains(typeof(IKnowsDB))) base.Context = DbScoped.SugarScope.GetConnection(1001); else base.Context = DbScoped.SugarScope; } } }