ActionCLASFactory.cs 794 B

1234567891011121314151617181920212223242526272829
  1. using CD67.FicheCollege.Entity;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Data.Entity;
  7. namespace CD67.FicheCollege.Factory
  8. {
  9. public partial class ActionCLASFactory : Internal.BaseFactory<Entity.ActionCLAS>
  10. {
  11. public override Entity.ActionCLAS getById(params object[] keyValues)
  12. {
  13. //si l'élément n'existe pas, on le créé
  14. Entity.ActionCLAS action = base.getById(keyValues);
  15. if(action == null)
  16. {
  17. string id = keyValues[0].ToString();
  18. action = new ActionCLAS()
  19. {
  20. College_Id = id
  21. };
  22. this.add(ref action);
  23. }
  24. return action;
  25. }
  26. }
  27. }