Reflection_1

1.获取Model的Attribute

>var auditAttr=dbEntry.Entity.GetType().GetCustomAttribute(typeof(AuditableAttribute),false).SingleOrDefault() as AuditableAttribute. var auditAttr=Attributes.GetCustomAttribute(dbEntry.Entity.GetType(),typeof(AuditableAttribute),false) as AuditableAttribute.

second p.

posted @ 2018-06-14 09:42  sujingnuli  阅读(163)  评论(0编辑  收藏  举报