public ActionResult Edit(SelfEmploymentViewModel selfEmplViewModel)
        {
            if (this.ModelState.IsValid)
            {
                var selfEmpl = this.mapService.Map <SelfEmployment>(selfEmplViewModel);

                this.selfService.UpdateById(selfEmpl.Id, selfEmpl);
                return(RedirectToAction("Index", "SelfEmployments"));
            }
            return(View(selfEmplViewModel));
        }
        public ActionResult Delete(int id, SelfEmploymentViewModel selfEmplViewModel)
        {
            var selfEmpl = this.selfService.GetById(id);

            if (selfEmpl == null)
            {
                return(HttpNotFound());
            }

            selfEmplViewModel = this.mapService.Map <SelfEmploymentViewModel>(selfEmpl);
            return(View(selfEmplViewModel));
        }
        public ActionResult DeleteConfirmed(int id, SelfEmploymentViewModel selfEmplViewModel)
        {
            this.selfService.DeleteById(id);

            return(RedirectToAction("Index", "SelfEmployments"));
        }