public ActionResult UserType(UserType ut) { if (UserTypeRepo.GetAll().Find(a => a.UserTypeName == ut.UserTypeName) == null) { UserTypeRepo.Insert(ut); } return(RedirectToAction("UserType")); }
public int AddUserType(DAL.Entity.UserType UserType) { try { _IUserTypeRepository.Insert(UserType); return(_IUserTypeRepository.Save()); } catch (Exception exception) { exception.Log(); return(0); } }