public void GetMemberName_SupplyInvalidExpression_ThrowsArgumentNullException()
        {
            TestDelegate testDelegate = () => PropertyName.GetMemberName(null);

            Assert.That(testDelegate, Throws.Exception.TypeOf <ArgumentNullException>().With.Property("ParamName").EqualTo("expression"));
        }
Exemplo n.º 2
0
        public IQueryable <CodeMaster> Get(Expression expression)
        {
            string type = PropertyName.GetMemberName(expression);

            return(db.CodeMasters.Where(r => r.Type == type).OrderBy(r => r.Order));
        }
Exemplo n.º 3
0
        public IQueryable <CodeMaster> Get(Expression expression)
        {
            string type = PropertyName.GetMemberName(expression);

            return(Get(type));
        }