mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 12:28:15 +08:00
- 调整 Aop 改为 event 事件;
- 调整 Ado.AopCommandExecuting/AopCommandExecuted 到 Aop.CommandBefore/After; - 增加 Aop.TraceBefore/After 事件;
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
@ -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())
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user