Пример #1
0
        public FakeModelAnnouncesTest()
        {
            announce.ListSport       = new List <Sport>();
            announce.ListActivity    = new List <Activity>();
            announce.TypeHabitat     = new TypeHabitat();
            announce.ListTypeHoliday = new List <TypeHoliday>();
            announce.ListCommoditer  = new List <Commoditer>();

            Sport sport1 = new Sport {
                SportID = 4
            };
            Sport sport2 = new Sport {
                SportID = 3
            };


            Activity Activity1 = new Activity {
                ActivityID = 2
            };
            Activity Activity2 = new Activity {
                ActivityID = 3
            };


            TypeHabitat habitat = new TypeHabitat {
                TypeID = 4
            };

            TypeHoliday holiday1 = new TypeHoliday {
                TypeID = 3
            };
            TypeHoliday holiday2 = new TypeHoliday {
                TypeID = 2
            };

            Commoditer com1 = new Commoditer {
                ComID = 3
            };
            Commoditer com2 = new Commoditer {
                ComID = 2
            };


            announce.ListSport.Add(sport1);
            announce.ListSport.Add(sport2);

            announce.ListActivity.Add(Activity1);
            announce.ListActivity.Add(Activity2);

            announce.TypeHabitat = habitat;

            announce.ListTypeHoliday.Add(holiday1);
            announce.ListTypeHoliday.Add(holiday2);

            announce.ListCommoditer.Add(com1);
            announce.ListCommoditer.Add(com2);
        }
Пример #2
0
 public static ModelsDAL.TypeHoliday APIToDALTypeHoliday(this ModelsAPI.TypeHoliday DALToAPI)
 {
     return(new ModelsDAL.TypeHoliday
     {
         TypeID = DALToAPI.TypeID,
         Name = DALToAPI.Name,
         IconDiv = DALToAPI.IconDiv,
         Image = DALToAPI.Image,
         Text = DALToAPI.Text
     });
 }