Compartilhar via


EntitySet: ProjectBaselines (ProjectData service)

In this article
Definition
Attributes
Parent element
Child elements

Specifies the collection of project baselines in the ReportingData schema.

Definition

<EntitySet Name="ProjectBaselines" EntityType="ReportingData.ProjectBaseline" />

Attributes

Attribute

Value

Description

Name

ProjectBaselines

The name of the entity set.

EntityType

ReportingData.ProjectBaseline

The type of entity.

Parent element

Element

Description

EntityContainer element: ReportingData

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

Child elements

None

Example

The following statement uses LINQ query syntax to retrieve ProjectBaseline entity data from the OData interface of the Project Server reporting tables. To use the statement in an application, set a service reference to the ProjectDataService, and initialize the ReportingData context. The ProjectBaselines entity set can then be accessed as context.ProjectBaselines. For more information, see Querying OData feeds for Project 2013 reporting data.

    var query =
    from p in ProjectBaselines
    select new
    {
        ProjectName = p.ProjectName,
        StartDate = p.ProjectBaselineStartDate,
        EndDate = p.ProjectBaselineFinishDate,
        ProjectBaselineWork = p.ProjectBaselineWork,
        ProjectBaselineCost = p.ProjectBaselineCost
    };

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

    var query = ProjectBaselines
    .Select( p => new
    {
        ProjectName = p.ProjectName,
        StartDate = p.ProjectBaselineStartDate,
        EndDate = p.ProjectBaselineFinishDate,
        ProjectBaselineWork = p.ProjectBaselineWork,
        ProjectBaselineCost = p.ProjectBaselineCost
    });

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

https://ServerName/pwa/_vti_bin/client.svc/ProjectServerData/ProjectBaselines()?
$select=ProjectName,ProjectBaselineStartDate,ProjectBaselineFinishDate,ProjectBaselineWork,ProjectBaselineCost

All three of the sample queries get the same data.

Sample results of the ProjectBaseline query

ProjectName

StartDate

EndDate

ProjectBaselineWork

ProjectBaselineCost

ProjectA

3/26/2012 8:00:00 AM

3/30/2012 5:00:00 PM

144.0 hrs

$2380.00

ProjectB

3/12/2012 8:00:00 AM

3/16/2012 5:00:00 PM

87.5 hrs

$1835.90

ProjectC

3/12/2012 8:00:00 AM

3/17/2012 5:00:00 PM

112.0 hrs

$1872.00

Remarks

Each entity set has a specific page-size limit. For information about page limits for on-premises and online ProjectData queries and how to set the on-premises page limit, see ProjectData - OData service reference.