public ActionResult Index(int page = 1, int pagesize = 5)
        {
            //var training = TrainingRepository.GetAll();
            //return View(training); //training);

            var training = _training.GetAll().ToList();
            PagedList <Training> trainingmodel = new PagedList <Training>(training, page, pagesize);

            return(View(trainingmodel));
        }
        public IEnumerable <Training> Get()
        {
            //ITraining training = new TrainingLogic();

            List <Training> entityTrainingList = training.GetAll().ToList();
            List <Training> modelTrainingList  = new List <Training>();

            foreach (Training item in entityTrainingList)
            {
                modelTrainingList.Add(new Training
                {
                    ID        = item.ID,
                    StartDate = item.StartDate,
                    EndDate   = item.EndDate,
                    Cost      = item.Cost,
                    RegistrationClosingDate = item.RegistrationClosingDate,
                    Venue = item.Venue
                });
            }
            return(modelTrainingList);
        }