Exemple #1
0
        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"));
        }
Exemple #2
0
 public void Create(T entity)
 {
     repo.Create(entity);
 }