public IActionResult Create([Bind("TypeId,TypeName")] DAL.Models.Type @type) { if (ModelState.IsValid) { _repository.Create(@type); return(RedirectToAction(nameof(Index))); } return(View(@type)); }
public int Create(Domain.Entities.Type t) { try { var res = _typesRepo.Create(t); return(res); } catch (Exception e) { throw e; } }