public ActionResult Create(UserAgentViewModel model) { if (ModelState.IsValid) { var userAgent = GetUserAgentFromViewModel(model); userAgent.CreatedBy = User.Identity.Name; _userAgentRepository.Save(userAgent); return(RedirectToAction("Index")); } GetCodecApiValues(model); return(View(model)); }
public void Save(UserAgent userAgent) { _internalRepository.Save(userAgent); }