public bool IsUserNameExist(string Name) { var isExist = false; var user = _supplyRepository.GetByName(Name); if (user != null) { isExist = true; } return(isExist); }