UniqueAttribute.cs 461 B

123456789101112131415161718
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel.DataAnnotations;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace Ropin.Inspection.Model.Common
  8. {
  9. [AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
  10. public class UniqueAttribute : ValidationAttribute
  11. {
  12. public override bool IsValid(object value)
  13. {
  14. return true;
  15. }
  16. }
  17. }