GetIn.UserRepository.AddRestriction C# (CSharp) Method

AddRestriction() private method

private AddRestriction ( ICriteria criteria, String type, Object value, System.Boolean exactMatch ) : void
criteria ICriteria
type String
value Object
exactMatch System.Boolean
return void
        private void AddRestriction(ICriteria criteria, String type, Object value,Boolean exactMatch)
        {
            if (criteria != null && type != null && value != null){
                if (exactMatch){
                    criteria.Add(Restrictions.Eq(type, value));
                } else{
                    criteria.Add(Restrictions.Like(type, value));
                }
            }
        }