public bool Authentication(string UserName, string Password) { LoginModel model = new LoginModel(); CCIRepository _repository = CCIRepository.CreateRepository(); model = _repository.GetUserName(); if (model.UserName.Equals(UserName) && model.Password.Equals(Password)) { return(true); } return(false); }