public ActionResult Create(StatusViewModel viewModel)
        {
            if (!ModelState.IsValid) { return View(viewModel); }

            Status status = Mapper.Map<Status>(viewModel);
            ServiceResult result = _statusService.AddStatus(status);

            if (!result.IsValid)
            {
                result.Errors.ToList().ForEach(x => ModelState.AddModelError(x.Key.ToString(), x.Value));
                return View();
            }

            TempData["message"] = "Status has been added";
            return RedirectToAction("Index");
        }
        public ActionResult Edit(StatusViewModel viewModel)
        {
            if (viewModel == null) { return new HttpStatusCodeResult(HttpStatusCode.BadRequest); }
            if (!ModelState.IsValid) { return View(viewModel); }

            Status status = Mapper.Map<Status>(viewModel);

            ServiceResult result = _statusService.UpdateStatus(status);

            if (!result.IsValid)
            {
                result.Errors.ToList().ForEach(x => ModelState.AddModelError(x.Key.ToString(), x.Value));
                return View();
            }

            TempData["message"] = "Status has been edited";
            return RedirectToAction("Index");
        }