Click here to Skip to main content
15,891,136 members
Articles / Web Development / ASP.NET

Composed LINQ Queries using the Decorator Pattern

Rate me:
Please Sign up or sign in to vote.
4.71/5 (14 votes)
28 Jun 2010CPOL4 min read 50.2K   332   32  
Design Patterns Series - Part I
using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;

namespace DecoratorPattern.Components
{
    public class EmployeeQuery : QueryComponent<Employee>
    {
        public override IQueryable<Employee> Query()
        {
            return new EmployeesRepository().GetAllEmployess().AsQueryable();
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
Canada Canada
MCP, MCAD .NET

Blog: C# | B# | Stay#

Comments and Discussions