EntityMapperAttribute.cs 516 B

1234567891011121314151617181920212223
  1. namespace Exam.Infrastructure.Data.Attributes
  2. {
  3. /// <summary>
  4. /// 实体映射属性
  5. /// </summary>
  6. [AttributeUsage(AttributeTargets.Class)]
  7. public class EntityMapperAttribute:Attribute
  8. {
  9. private readonly string _entityName;
  10. public string EntityName
  11. {
  12. get
  13. {
  14. return _entityName;
  15. }
  16. }
  17. public EntityMapperAttribute(string entityName)
  18. {
  19. _entityName = entityName;
  20. }
  21. }
  22. }