public IActionResult Create([Bind("Id,Name,Phone,Email,Address,LinkedinProfile")] Trainer trainer) { if (ModelState.IsValid) { _iTrainerManager.Add(trainer); return(RedirectToAction(nameof(Index))); } return(View(trainer)); }
public IActionResult Create(Trainer trainer) { if (ModelState.IsValid) { trainer.CreatedAt = DateTime.Now; trainer.UpdatedAt = DateTime.Now; _iTrainerManager.Add(trainer); return(RedirectToAction(nameof(Index))); } return(View(trainer)); }