-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ODS-4268] Release tasks for ODS/API 5.0.0 (#90)
- Loading branch information
1 parent
15bfde6
commit 9d505d9
Showing
2,245 changed files
with
1,716,742 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Declare files that will always have CRLF line endings on checkout. | ||
*.tt eol=crlf | ||
*.ttinclude eol=crlf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
# Build Folders (you can keep bin if you'd like, to store dlls and pdbs) | ||
[Bb]in | ||
csx/ | ||
rcf/ | ||
[Oo]bj | ||
logistics/bin | ||
.vs/ | ||
|
||
#User-specific files | ||
*.suo | ||
*.csproj.user | ||
*.ccproj.user | ||
*.sln.DotSettings.user | ||
*.csproj.DotSettings.user | ||
*.pubxml.user | ||
*.dbmdl | ||
.vs/ | ||
|
||
#NCrunch | ||
_NCrunch* | ||
*.ncrunchsolution | ||
*.ncrunchsolution.user | ||
*.ncrunchproject | ||
*.ncrunchproject.user | ||
|
||
#Vim backup files | ||
*~ | ||
|
||
#MS Office Backup Files | ||
~* | ||
|
||
#Resharper files | ||
_ReSharper.* | ||
*.resharper | ||
*.resharper.user | ||
|
||
#Rider files | ||
.idea/ | ||
|
||
#Others | ||
*.cache | ||
*.orig | ||
*.original | ||
|
||
#Packages | ||
packages/ | ||
/*.dll | ||
/*.pdb | ||
/*.XML | ||
|
||
#nDevConfig | ||
.workspaceInitialized | ||
nDevConfig/ | ||
|
||
#Database Project Files | ||
application/EdFi.Ods.Entities.NHibernate/DescriptorMigration.sql | ||
application/EduId.Database/EduId.Database.dbmdl | ||
|
||
#Release Notes Working File | ||
ReleaseNotes/pending.md | ||
|
||
#lib directory | ||
libs/ | ||
libs.codegen/ | ||
schema.codegen/ | ||
logistics/Services/ | ||
|
||
#Generated code | ||
*.generated.cs | ||
*.generated.txt | ||
*.generated.sql | ||
*.generated.resx | ||
*.generated.hbm.xml | ||
*_generated.sql | ||
*.feature.cs | ||
|
||
#Copies of generated code | ||
*.generated - Copy.cs | ||
*.generated - Copy.resx | ||
|
||
#Sample MetaEd | ||
Samples/Extensions/**/MetaEdOutput/EdFi/ | ||
Samples/Extensions/**/MetaEdOutput/Documentation/ | ||
|
||
#Database project working files | ||
Import Schema Logs | ||
|
||
# Approval tests | ||
*.received.txt | ||
Utilities/SdkGen/EdFi.SdkGen.Console/sdk-generate.jar | ||
|
||
# Keep older versions of MetaEd artifacts out of source control | ||
Application/EdFi.Ods.CodeGen/App_Packages | ||
|
||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"recommendations": [ | ||
"psioniq.psi-header", | ||
"ms-dotnettools.csharp", | ||
"ms-vscode.powershell", | ||
"streetsidesoftware.code-spell-checker" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{ | ||
"files.associations": { | ||
"*.metaed": "csharp" | ||
}, | ||
"psi-header.config": { | ||
"forceToTop": true, | ||
"blankLinesAfter": 1, | ||
"license": "Custom" | ||
}, | ||
"psi-header.templates": [ | ||
{ | ||
"language": "*", | ||
"template": [ | ||
"SPDX-License-Identifier: Apache-2.0", | ||
"Licensed to the Ed-Fi Alliance under one or more agreements.", | ||
"The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.", | ||
"See the LICENSE and NOTICES files in the project root for more information." | ||
] | ||
} | ||
], | ||
"psi-header.lang-config":[ | ||
{ | ||
"_": "Apply double slash-based comments", | ||
"language": "csharp", | ||
"begin": "", | ||
"end": "", | ||
"prefix": "// " | ||
}, | ||
{ | ||
"language": "javascript", | ||
"mapTo": "csharp" | ||
}, | ||
{ | ||
"language": "typescript", | ||
"mapTo": "csharp" | ||
}, | ||
{ | ||
"language": "metaed", | ||
"mapTo": "csharp" | ||
}, | ||
{ | ||
"_": "Apply hash-based comments", | ||
"language": "python", | ||
"begin": "", | ||
"end": "", | ||
"prefix": "# " | ||
}, | ||
{ | ||
"language": "powershell", | ||
"mapTo": "python" | ||
}, | ||
{ | ||
"language": "dockerfile", | ||
"mapTo": "python" | ||
}, | ||
{ | ||
"_": "Apply double dash-based comments", | ||
"language": "sql", | ||
"begin": "", | ||
"end": "", | ||
"prefix": "-- " | ||
} | ||
], | ||
"psi-header.changes-tracking": { | ||
"autoHeader": "autoSave", | ||
"exclude": [ | ||
"css", "json", "xml", "config", "plaintext", "markdown", "batch" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<AssemblyVersion>1.0.0</AssemblyVersion> | ||
<FileVersion>1.0.0</FileVersion> | ||
<InformationalVersion>1.0.0</InformationalVersion> | ||
</PropertyGroup> | ||
</Project> |
129 changes: 129 additions & 0 deletions
129
Application/EdFi.Admin.DataAccess/Contexts/IUsersContext.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// Licensed to the Ed-Fi Alliance under one or more agreements. | ||
// The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. | ||
// See the LICENSE and NOTICES files in the project root for more information. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Data.Entity; | ||
using System.Threading.Tasks; | ||
using EdFi.Admin.DataAccess.Models; | ||
|
||
namespace EdFi.Admin.DataAccess.Contexts | ||
{ | ||
public interface IUsersContext : IDisposable | ||
{ | ||
IDbSet<User> Users { get; set; } | ||
|
||
IDbSet<ApiClient> Clients { get; set; } | ||
|
||
IDbSet<ClientAccessToken> ClientAccessTokens { get; set; } | ||
|
||
IDbSet<Vendor> Vendors { get; set; } | ||
|
||
IDbSet<Application> Applications { get; set; } | ||
|
||
IDbSet<Profile> Profiles { get; set; } | ||
|
||
IDbSet<OdsInstance> OdsInstances { get; set; } | ||
|
||
IDbSet<OdsInstanceComponent> OdsInstanceComponents { get; set; } | ||
|
||
IDbSet<ApplicationEducationOrganization> ApplicationEducationOrganizations { get; set; } | ||
|
||
IDbSet<VendorNamespacePrefix> VendorNamespacePrefixes { get; set; } | ||
|
||
IDbSet<OwnershipToken> OwnershipToken { get; set; } | ||
|
||
int SaveChanges(); | ||
|
||
Task<int> SaveChangesAsync(); | ||
|
||
/// <summary> | ||
/// Asynchronously executes a raw SQL statement with only a scalar result (e.g. row count). | ||
/// </summary> | ||
/// <param name="sqlStatement">Query to execute, optionally containing parameter strings using @ symbol token</param> | ||
/// <param name="parameters">Optional parameters</param> | ||
/// <returns>Statement result (row count by default)</returns> | ||
/// <example> | ||
/// <para> | ||
/// No parameters: | ||
/// </para> | ||
/// <code> | ||
/// <![CDATA[ | ||
/// string sqlCommand = "UPDATE dbo.Something SET FieldOne = null"; | ||
/// IReadOnlyList<Something> result = await _usersContext.ExecuteQueryAsync<Something>(sqlCommand); | ||
/// ]]> | ||
/// </code> | ||
/// <para> | ||
/// Single parameter, @p0. The name does not matter; @p0 is a good standard to follow to indicate to the reader that it is the first parameter. | ||
/// </para> | ||
/// <code> | ||
/// <![CDATA[ | ||
/// int fieldTwoLowerLimit = 30; | ||
/// string sqlCommand = "UPDATE dbo.Something SET FieldOne = null WHERE FieldTwo > @p0"; | ||
/// IReadOnlyList<Something> result = await _usersContext.ExecuteQueryAsync<Something>(sqlCommand, fieldTwoLowerLimit); | ||
/// ]]> | ||
/// </code> | ||
/// <para> | ||
/// Two parameters, second one for a CreateDate field that we're not going to return. | ||
/// </para> | ||
/// <code> | ||
/// <![CDATA[ | ||
/// int fieldTwoLowerLimit = 30; | ||
/// DateTime createDateUpperLimit = DateTime.Parse(2020,1,1); | ||
/// string sqlCommand = "UPDATE dbo.Something SET FieldOne = null WHERE FieldTwo > @p0 AND CreateDate < '@p1'"; | ||
/// IReadOnlyList<Something> result = await _usersContext.ExecuteQueryAsync<Something>(sqlCommand, fieldTwoLowerLimit, createDateUpperLimit); | ||
/// ]]> | ||
/// </code> | ||
/// </example> | ||
Task<int> ExecuteSqlCommandAsync(string sqlStatement, params object[] parameters); | ||
|
||
/// <summary> | ||
/// Asynchronously executes a raw SQL query and maps the results to an object of type <typeparamref name="TReturn"/>. | ||
/// </summary> | ||
/// <typeparam name="TReturn">Any class with properties matching the column names in the query</typeparam> | ||
/// <param name="sqlStatement">Query to execute, optionally containing parameter strings using @ symbol token</param> | ||
/// <param name="parameters">Optional parameters</param> | ||
/// <returns>Readonly list of <typeparamref name="TReturn"/></returns> | ||
/// <example> | ||
/// <para> | ||
/// Given this return entity: | ||
/// </para> | ||
/// <code> | ||
/// public class Something { public string FieldOne { get; set; } public int FieldTwo { get; set; } } | ||
/// </code> | ||
/// <para> | ||
/// No parameters: | ||
/// </para> | ||
/// <code> | ||
/// <![CDATA[ | ||
/// string sqlCommand = "SELECT FieldOne, FieldTwo FROM dbo.Something"; | ||
/// IReadOnlyList<Something> result = await _usersContext.ExecuteQueryAsync<Something>(sqlCommand); | ||
/// ]]> | ||
/// </code> | ||
/// <para> | ||
/// Single parameter, @p0. The name does not matter; @p0 is a good standard to follow to indicate to the reader that it is the first parameter. | ||
/// </para> | ||
/// <code> | ||
/// <![CDATA[ | ||
/// int fieldTwoLowerLimit = 30; | ||
/// string sqlCommand = "SELECT FieldOne, FieldTwo FROM dbo.Something WHERE FieldTwo > @p0"; | ||
/// IReadOnlyList<Something> result = await _usersContext.ExecuteQueryAsync<Something>(sqlCommand, fieldTwoLowerLimit); | ||
/// ]]> | ||
/// </code> | ||
/// <para> | ||
/// Two parameters, second one for a CreateDate field that we're not going to return. | ||
/// </para> | ||
/// <code> | ||
/// <![CDATA[ | ||
/// int fieldTwoLowerLimit = 30; | ||
/// DateTime createDateUpperLimit = DateTime.Parse(2020,1,1); | ||
/// string sqlCommand = "SELECT FieldOne, FieldTwo FROM dbo.Something WHERE FieldTwo > @p0 AND CreateDate < '@p1'"; | ||
/// IReadOnlyList<Something> result = await _usersContext.ExecuteQueryAsync<Something>(sqlCommand, fieldTwoLowerLimit, createDateUpperLimit); | ||
/// ]]> | ||
/// </code> | ||
/// </example> | ||
Task<IReadOnlyList<TReturn>> ExecuteQueryAsync<TReturn>(string sqlStatement, params object[] parameters); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
Application/EdFi.Admin.DataAccess/Contexts/IUsersContextFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// Licensed to the Ed-Fi Alliance under one or more agreements. | ||
// The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. | ||
// See the LICENSE and NOTICES files in the project root for more information. | ||
|
||
namespace EdFi.Admin.DataAccess.Contexts | ||
{ | ||
public interface IUsersContextFactory | ||
{ | ||
IUsersContext CreateContext(); | ||
} | ||
} |
Oops, something went wrong.