Example #1
0
        public static void Persist(Prestation prestation, int poleId, Dictionary <string, bool> territoires)
        {
            prestation.Pole = DAO.Find <Pole>(poleId);
            DAO.Persist(prestation);
            IEnumerable <Territoire> territoireSet = IsJoinedDictionary.ToDbSet <Territoire>(territoires);

            territoireSet.Each(t => PrestationTerritoireDAO.Join(prestation, t));
        }
Example #2
0
 public static void Persist(Activite activite, IEnumerable <int> territoireIds)
 {
     territoireIds.Each(id =>
     {
         PrestationTerritoireDAO.AddActivite(activite.PrestationID, id, new Activite()
         {
             Nom = activite.Nom, PrestationID = activite.PrestationID, TerritoireID = id
         });
     });
 }