添加sqllite

This commit is contained in:
橙子
2022-04-09 00:54:13 +08:00
parent 7aee6c4c12
commit eacd7f1588
5 changed files with 17 additions and 16 deletions

View File

@@ -34,9 +34,7 @@ namespace Yi.Framework.WebCore.MiddlewareExtend
if (entityInfo.PropertyName == "TenantId")
{
//现在不能直接给了要根据判断一下租户等级如果租户等级是1不给需要自己去赋值如果租户等级是0就执行下面的。
//entityInfo.SetValue(new Guid(httpcontext.Request.Headers["TenantId"].ToString()));
//查询的时候,也需要判断一下,如果是租户等级,不要租户条件,如果是超级租户,就返回所有
}
break;
case DataFilterType.UpdateByObject:
@@ -50,22 +48,18 @@ namespace Yi.Framework.WebCore.MiddlewareExtend
}
break;
}
//inset生效
};
//如果用单例配置要统一写在这儿
db.Aop.OnLogExecuting = (s, p) =>
{
Console.WriteLine("_______________________________________________");
Console.WriteLine(s);
Console.WriteLine("执行SQL:"+s.ToString());
Console.WriteLine("_______________________________________________");
};
});
services.AddSingleton<ISqlSugarClient>(sqlSugar);//这边是SqlSugarScope用AddSingleton
}
}