コード例 #1
0
        public static IQueryable <Tracker.Data.Entities.Audit> ByUser(this IQueryable <Tracker.Data.Entities.Audit> queryable, ComparisonOperator comparisonOperator, Tracker.Data.Entities.User user)
        {
            switch (comparisonOperator)
            {
            case ComparisonOperator.Equals:
                return(queryable.Where(a => a.User == user));

            case ComparisonOperator.NotEquals:
                return(queryable.Where(a => a.User != user));

            default:
                throw new ArgumentException("Parameter 'comparisonOperator' must be ComparisonOperator.Equals or ComparisonOperator.NotEquals to support Association type.", "comparisonOperator");
            }
        }
コード例 #2
0
 public static IQueryable <Tracker.Data.Entities.Audit> ByUser(this IQueryable <Tracker.Data.Entities.Audit> queryable, Tracker.Data.Entities.User user)
 {
     return(queryable.ByUser(ComparisonOperator.Equals, user));
 }