public ActionResult Create(C model) { if (!this.ModelState.IsValid) { return(View(model)); } BaseRepo <T> repo = SetRepo(); T newItem = new T(); PopulateItem(newItem, model); repo.Create(newItem); return(RedirectToAction("Index")); }
public void Create(T entity) { repo.Create(entity); }