CompareHelp.cs 795 B

123456789101112131415161718192021
  1. using AipGateway.AIP;
  2. using AipGateway.API.Domain.Entities;
  3. namespace AipGateway.API.Application.Utils
  4. {
  5. public static class CompareHelp
  6. {
  7. public static bool IsChanged(this TbAipLabel aipLabel, AipLabel label)
  8. {
  9. return (aipLabel.LabelName != label.Name) || (aipLabel.LabelDesc != label.Description);
  10. }
  11. public static bool IsChanged(this TbAipPolicy aipPolicy, AipLabel label)
  12. {
  13. return (aipPolicy.PolicyName != label.Name) || (aipPolicy.PolicyDesc != label.Description);
  14. }
  15. public static bool IsChanged(this TbAipProtection aipProtection, AipTemplate label)
  16. {
  17. return (aipProtection.ProtectionName != label.Name) || (aipProtection.ProtectionDesc != label.Description);
  18. }
  19. }
  20. }