Helpers.cs 484 B

12345678910111213141516171819202122
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using Tutorial026.Models;
  7. namespace Tutorial026
  8. {
  9. public static class Helpers
  10. {
  11. public static Attributes Sum(this IEnumerable<Attributes> attributes)
  12. {
  13. var finalAttributes = new Attributes();
  14. foreach (var attribute in attributes)
  15. finalAttributes += attribute;
  16. return finalAttributes;
  17. }
  18. }
  19. }