Пример #1
0
        public ActionResult Add(ApiTokensAddModel model)
        {
            _apiTokenService.Add(model, Customer.OriginalCustomer);

            return(RedirectToAction("index")
                   .AndAlert(AlertType.Success, "Success.", "Api Token added successfully."));
        }
Пример #2
0
        public void Add(ApiTokensAddModel model, Customer customer)
        {
            var apiToken = new ApiToken(model.Name, customer);

            _apiTokenRepository.Add(apiToken);
            _unitOfWork.Commit();
        }