public void RegisteBoard(SliderEntity slider) { SlidersList.Add(slider); }
public void Add <T>(T model) { var theType = model.GetType().Name; switch (theType) { case "User": UsersList.Add(model as User); return; case "News": NewsesList.Add(model as Dal.Models.News); return; case "Category": CategoriesList.Add(model as Category); return; case "Magazine": MagazinesList.Add(model as Magazine); return; case "SmartLink": SmartLinksList.Add(model as SmartLink); return; case "Comment": CommentsList.Add(model as Comment); return; case "Visit": VisitsList.Add(model as Visit); return; case "NewsLetter": NewsLettersList.Add(model as NewsLetter); return; case "Slider": SlidersList.Add(model as Slider); return; case "Slide": SlidesList.Add(model as Slide); return; case "UserMagazine": UserMagazinesList.Add(model as UserMagazine); return; case "State": StatesList.Add(model as State); return; case "City": CitiesList.Add(model as City); return; case "Media": MediasList.Add(model as Media); return; case "Report": ReportsList.Add(model as Report); return; case "Vote": VotesList.Add(model as Vote); return; case "Advertise": AdvertisesList.Add(model as Advertise); return; case "AdCategory": AdCategoriesList.Add(model as AdCategory); return; case "Galery": GaleriesList.Add(model as Galery); return; case "GaleryImage": GaleryImagesList.Add(model as GaleryImage); return; case "Image": ImagesList.Add(model as Image); return; case "KeyPoint": KeyPointsList.Add(model as KeyPoint); return; case "KeyPointsContainer": KeyPointsContainersList.Add(model as KeyPointsContainer); return; case "Quiz": QuizesList.Add(model as Quiz); return; case "Question": QuestionsList.Add(model as Question); return; case "Answer": AnswersList.Add(model as Answer); return; case "Option": OptionList.Add(model as Option); return; case "ItemList": ItemsListList.Add(model as ItemList); return; default: throw new Exception("The type " + theType + " is not supported."); } }