EduHub.Data 1.59.12

Provides strongly-typed object model for eduHub Data Sets

There is a newer version of this package available.
See the version list below for details.
Install-Package EduHub.Data -Version 1.59.12
dotnet add package EduHub.Data --version 1.59.12
<PackageReference Include="EduHub.Data" Version="1.59.12" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EduHub.Data --version 1.59.12
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: EduHub.Data, 1.59.12"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install EduHub.Data as a Cake Addin
#addin nuget:?package=EduHub.Data&version=1.59.12

// Install EduHub.Data as a Cake Tool
#tool nuget:?package=EduHub.Data&version=1.59.12
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

eduHub Data

A .NET (C#, Visual Basic.NET, etc) strongly-typed object model which provides in-memory, lazy-loading of eduHub CSV Data Sets.

on NuGet
Install-Package EduHub.Data

USAGE

Simple Query (C#)

All active students

// Create context
var Context = new EduHubContext();

// Build using query syntax
var activeStudents = (
    from st in Context.ST
    where st.STATUS == "ACTV"
    select new
    {
        StudentCode = st.STKEY,
        Name = $"{st.SURNAME}, {st.FIRST_NAME}",
        HomeGroup = st.HOME_GROUP,
        YearLevel = st.SCHOOL_YEAR
    });
Navigation Properties (C#)

Data set relationships can be navigated with additional data sets automatically loaded when needed

// Create Context
var Context = new EduHubContext();

// Build using query syntax
// ST.FAMILY_DF and DF.HOMEKEY_UM navigation properties used
var activeStudentTowns = (
    from st in Context.ST
    let family = st.FAMILY_DF
    let home = family.HOMEKEY_UM
    where st.STATUS == "ACTV"
    orderby st.SCHOOL_YEAR, st.HOME_GROUP
    select new
    {
        StudentCode = st.STKEY,
        HomeGroup = st.HOME_GROUP,
        YearLevel = st.SCHOOL_YEAR,
        Town = home.ADDRESS03,
        PostCode = home.POSTCODE
    });
PowerShell Example

Download the latest release for PowerShell

Add-Type -Path "EduHub.Data.dll";

$eduHubContext = New-Object EduHub.Data.EduHubContext;

$studentAddresses = $eduHubContext.ST `
    | Where-Object { $_.STATUS -eq "ACTV" } `
    | Select-Object -Property `
        STKEY,
        SURNAME,
        FIRST_NAME,
        HOME_GROUP,
        SCHOOL_YEAR,
        @{ Name = "BILLINGTITLE"; Expression = { $_.FAMILY_DF.BILLINGTITLE } },
        @{ Name = "ADDRESS01";    Expression = { $_.FAMILY_DF.BILLINGKEY_UM.ADDRESS01 } },
        @{ Name = "ADDRESS02";    Expression = { $_.FAMILY_DF.BILLINGKEY_UM.ADDRESS02 } },
        @{ Name = "ADDRESS03";    Expression = { $_.FAMILY_DF.BILLINGKEY_UM.ADDRESS03 } },
        @{ Name = "STATE";        Expression = { $_.FAMILY_DF.BILLINGKEY_UM.STATE } },
        @{ Name = "COUNTRY";      Expression = { $_.FAMILY_DF.BILLINGKEY_UM.COUNTRY_KGT.DESCRIPTION } };

$studentAddresses | Export-Csv StudentAddresses.csv -NoTypeInformation

eduHub Data

A .NET (C#, Visual Basic.NET, etc) strongly-typed object model which provides in-memory, lazy-loading of eduHub CSV Data Sets.

on NuGet
Install-Package EduHub.Data

USAGE

Simple Query (C#)

All active students

// Create context
var Context = new EduHubContext();

// Build using query syntax
var activeStudents = (
    from st in Context.ST
    where st.STATUS == "ACTV"
    select new
    {
        StudentCode = st.STKEY,
        Name = $"{st.SURNAME}, {st.FIRST_NAME}",
        HomeGroup = st.HOME_GROUP,
        YearLevel = st.SCHOOL_YEAR
    });
Navigation Properties (C#)

Data set relationships can be navigated with additional data sets automatically loaded when needed

// Create Context
var Context = new EduHubContext();

// Build using query syntax
// ST.FAMILY_DF and DF.HOMEKEY_UM navigation properties used
var activeStudentTowns = (
    from st in Context.ST
    let family = st.FAMILY_DF
    let home = family.HOMEKEY_UM
    where st.STATUS == "ACTV"
    orderby st.SCHOOL_YEAR, st.HOME_GROUP
    select new
    {
        StudentCode = st.STKEY,
        HomeGroup = st.HOME_GROUP,
        YearLevel = st.SCHOOL_YEAR,
        Town = home.ADDRESS03,
        PostCode = home.POSTCODE
    });
PowerShell Example

Download the latest release for PowerShell

Add-Type -Path "EduHub.Data.dll";

$eduHubContext = New-Object EduHub.Data.EduHubContext;

$studentAddresses = $eduHubContext.ST `
    | Where-Object { $_.STATUS -eq "ACTV" } `
    | Select-Object -Property `
        STKEY,
        SURNAME,
        FIRST_NAME,
        HOME_GROUP,
        SCHOOL_YEAR,
        @{ Name = "BILLINGTITLE"; Expression = { $_.FAMILY_DF.BILLINGTITLE } },
        @{ Name = "ADDRESS01";    Expression = { $_.FAMILY_DF.BILLINGKEY_UM.ADDRESS01 } },
        @{ Name = "ADDRESS02";    Expression = { $_.FAMILY_DF.BILLINGKEY_UM.ADDRESS02 } },
        @{ Name = "ADDRESS03";    Expression = { $_.FAMILY_DF.BILLINGKEY_UM.ADDRESS03 } },
        @{ Name = "STATE";        Expression = { $_.FAMILY_DF.BILLINGKEY_UM.STATE } },
        @{ Name = "COUNTRY";      Expression = { $_.FAMILY_DF.BILLINGKEY_UM.COUNTRY_KGT.DESCRIPTION } };

$studentAddresses | Export-Csv StudentAddresses.csv -NoTypeInformation

Dependencies

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.60.17 322 3/7/2019
1.60.16 361 2/9/2019
1.59.12 536 6/22/2018
1.59.11 577 12/19/2017
1.58.10 542 5/26/2017
0.9.8 600 12/1/2016
0.9.7-rc1 528 6/16/2016
0.9.6 658 1/18/2016
0.9.5 586 1/11/2016
0.9.2 581 12/21/2015
0.9.1-rc1 601 12/10/2015
0.9.0 795 11/25/2015
0.8.0 758 10/22/2015
0.7.5 780 10/1/2015
0.7.3 941 8/20/2015
0.7.2 936 8/18/2015
0.7.1 836 8/15/2015
0.7.0 826 8/14/2015