public ActionResult Create(Tipo collection) { try { // TODO: Add insert logic here _tipoRepository.Adicionar(collection); return(RedirectToAction(nameof(Index))); } catch { return(View()); } }
public Tipo Adicionar(Tipo entity) { return(_tipoRepository.Adicionar(entity)); }