- 调整 Aop 改为 event 事件;

- 调整 Ado.AopCommandExecuting/AopCommandExecuted 到 Aop.CommandBefore/After;
- 增加 Aop.TraceBefore/After 事件;
This commit is contained in:
28810
2020-03-02 18:57:53 +08:00
parent 32703e016a
commit 24cc8bc1da
58 changed files with 1109 additions and 638 deletions

View File

@ -485,7 +485,7 @@ WHERE ROWNUM < 11";
// .ExecuteAffrows();
g.mysql.Aop.ParseExpression = (s, e) =>
g.mysql.Aop.ParseExpression += (s, e) =>
{
if (e.Expression.NodeType == ExpressionType.Call)
{

View File

@ -37,7 +37,7 @@ namespace FreeSql.Tests.DataAnnotations
{
g.mysql.CodeFirst.ConfigEntity<ModelAopConfigEntity>(a => a.Property(b => b.pkid).IsPrimary(true));
g.mysql.Aop.ConfigEntity = (s, e) =>
g.mysql.Aop.ConfigEntity += (s, e) =>
{
var attr = e.EntityType.GetCustomAttributes(typeof(System.ComponentModel.DataAnnotations.Schema.TableAttribute), false).FirstOrDefault() as System.ComponentModel.DataAnnotations.Schema.TableAttribute;
if (attr != null)
@ -45,7 +45,7 @@ namespace FreeSql.Tests.DataAnnotations
e.ModifyResult.Name = attr.Name;
}
};
g.mysql.Aop.ConfigEntityProperty = (s, e) =>
g.mysql.Aop.ConfigEntityProperty += (s, e) =>
{
if (e.Property.GetCustomAttributes(typeof(System.ComponentModel.DataAnnotations.KeyAttribute), false).Any())
{

View File

@ -756,7 +756,7 @@ namespace FreeSql.Tests
// .ExecuteAffrows();
g.mysql.Aop.ParseExpression = (s, e) =>
g.mysql.Aop.ParseExpression += (s, e) =>
{
if (e.Expression.NodeType == ExpressionType.Call)
{

View File

@ -459,7 +459,7 @@ namespace FreeSql.Tests
a.SubjectId
}).NoneParameter().ToSql();
g.mysql.Aop.ParseExpression = (s, e) =>
g.mysql.Aop.ParseExpression += (s, e) =>
{
if (e.Expression.NodeType == ExpressionType.Call)
{