public ActionResult Create(AccountInputModel accountInputModel)
        {
            var account = _mappingEngine.Map<AccountInputModel, Account>(accountInputModel);
            _repository.Create<Account>(account);

            return RedirectToAction("Index", "Sales");
        }
        public ActionResult Edit(AccountInputModel accountInputModel, long id)
        {
            var account = _repository.GetById<Account>(id);
            account = _mappingEngine.Map<AccountInputModel, Account>(accountInputModel);

            Success("User {0} has been updated");
            return View("Create",accountInputModel);
        }
        public ActionResult Create(AccountInputModel accountInputModel)
        {
            var account = Mapper.Map<AccountInputModel, Account>(accountInputModel);

            _repository.Create(account);

            return RedirectToAction("Index","Sale");
        }
 public ActionResult Edit(AccountInputModel model, int id)
 {
     if (ModelState.IsValid)
     {
         var account = _mappingEngine.Map<AccountInputModel, Account>(model);
         _repository.Update(account);
         return RedirectToAction("index");
     }
     return View("Create", model);
 }
        public ActionResult Edit(AccountInputModel model, int id)
        {
            if (ModelState.IsValid)
            {
                var account = _repository.GetById<Account>(model.Id);
                var tempSale = account.Sales;
                account = _mappingEngine.Map<AccountInputModel, Account>(model);
                account.Sales = tempSale;
                _repository.Update(account);

                Success("The model was updated!");
                return RedirectToAction("index");
            }
            return View("Create", model);
        }
 public ActionResult Create(AccountInputModel accountInputModel)
 {
     var account = _mappingEngine.Map<AccountInputModel, Account>(accountInputModel);
     Information("This method is not implemented");
     return View(accountInputModel);
 }