public IHttpActionResult GetTasks()
        {
            try
            {
                var results = _repository.GetAllTasks();

                return(Ok(Mapper.Map <IEnumerable <TaskViewModel> >(results)));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }
        public ActionResult Index()
        {
            var results = _repository.GetAllTasks();

            return(View(Mapper.Map <IEnumerable <TaskViewModel> >(results)));
        }