public ActionResult Add(ApiTokensAddModel model) { _apiTokenService.Add(model, Customer.OriginalCustomer); return(RedirectToAction("index") .AndAlert(AlertType.Success, "Success.", "Api Token added successfully.")); }
public void Add(ApiTokensAddModel model, Customer customer) { var apiToken = new ApiToken(model.Name, customer); _apiTokenRepository.Add(apiToken); _unitOfWork.Commit(); }