public ActionResult Index(Skill model) { if (ModelState.IsValid) { model.Created = DateTime.UtcNow; model.Updated = DateTime.UtcNow; _searchProvider.AddUpdateEntity(model); return Redirect("Search/Index"); } return View("Index", model); }
public void AddUpdateEntity(Skill skill) { _context.AddUpdateDocument(skill, skill.Id); _context.SaveChanges(); }