EntitySet: Projects (ProjectData service)

Office 2013

Last modified: October 04, 2012

In this article
Definition
Attributes
Parent element
Child elements

Specifies the collection of projects in the ReportingData schema.

<EntitySet Name="Projects" EntityType="ReportingData.Project" />

Attribute

Value

Description

Name

Projects

The name of the entity set.

EntityType

ReportingData.Project

The type of entity.

Element

Description

EntityContainer element: ReportingData

Contains definitions of entity sets for internal use in queries of the online Reporting database.

The Projects entity set has a default maximum page limit of 100 projects in one query. For information about how to query for more than 100 projects, and how to get and set the page limit, see ProjectData - OData service reference.

var query =
    from p in Projects
    where p.ProjectStartDate > new DateTime(2012, 1, 1)
    orderby p.ProjectName
    select new
    {
        Project = p.ProjectName,
        StartDate = p.ProjectStartDate,
        FinishDate = p.ProjectFinishDate,
        ProjectCost = p.ProjectCost
    };

The preceding statement can be written by using Lambda expression syntax, as follows:

var query = Projects
    .Where(p => (p.ProjectStartDate > (DateTime?)(new DateTime(2012, 1, 1))))
    .OrderBy(p => p.ProjectName)
    .Select(p => new
    {
        Project = p.ProjectName,
        StartDate = p.ProjectStartDate,
        FinishDate = p.ProjectFinishDate,
        ProjectCost = p.ProjectCost
    });

Either statement creates the following REST URL (all on one line).

http://ServerName/pwa/_vti_bin/client.svc/ProjectServerData/Projects()?
    $filter=ProjectStartDate gt datetime'2012-01-01T00:00:00'&
    $orderby=ProjectName&
    $select=ProjectName,ProjectStartDate,ProjectFinishDate,ProjectCost

All three of the sample queries get the same data.

Sample results of the Task query

Project

StartDate

FinishDate

ProjectCost

ProjectA

3/1/2012 8:00:00 AM

3/15/2012 5:00:00 PM

$1124.00

ProjectB

3/1/2012 8:00:00 AM

3/24/2012 5:00:00 PM

$2171.00

ProjectC

3/1/2012 8:00:00 AM

3/17/2012 5:00:00 PM

$1968.00

Show:
© 2015 Microsoft