Date: Fri, 29 Mar 2024 09:01:34 -0500 (CDT) Message-ID: <1757923198.30394.1711720894423@PUBEDFIPRDWEB5.public.local> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_30393_290359036.1711720894420" ------=_Part_30393_290359036.1711720894420 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
This example outlines the steps necessary to integrate and activate Ed-F= i Profile definitions for use in an Ed-Fi ODS / API. It is assumed tha= t the Ed-Fi ODS / API has been successfully set up and is running in a loca= l environment per the instructions in the Getting Started documentation.
The steps in Visual Studio can be summarized as:
Detail on each step follows.
Update the Marker Interface Fil= e. To integrate the Profiles with the API, start by ensuring = you have a marker interface in the root of your Profiles project.
=This interface is an idiom used in the Ed-F= i Visual Studio Solution to enable a strongly typed mechanism for obtaining= a reference to the .NET assembly. If you used the Visual Studio Project te= mplate to create your profile, a file will already exist =E2=80=94 but you'= ll need to rename the interface and the file to match the convention (e.g.,= Marker_EdFi_Ods_Profiles_MyProfiles.cs). The marker interface file should have the= following code:
namespace= EdFi.Ods.Profiles.MyProfiles { public interface Marker_EdFi_Ods_Profiles_MyProfiles { } }
Add references to extension entities. If any o= f the Profile resources in the Profiles.xml document are extended, or exten= sion entities are being constrained by a particular Profile, then project r= eferences are needed for the assemblies containing the extensions. As an ex= ample, in the Profile.xml file created by the Visual Studio template, Schoo= l-and-Student-Sample has the resource School, which is extended in the= EdFi.Ods.Extensions.Sample and EdFi.Ods= .Extensions.TPDM sample extensions. A hard project reference = to this Ed-Fi Extension assembly must be added to the newly created Profile= project.
To integrate the Profiles into the solution, add a reference to the Prof= iles project you constructed in the previous step in the EdFi.= Ods.WebApi project (located in the "Entry Points" folder= ).
Save all modified files, close the Ed-Fi-ODS Visual Studio Solution, the=
n re-run the code generation steps outlined in the Getting Started Guide (i=
.e., from a PowerShell prompt run Initialize-PowershellForDevelo=
pment.ps
script followed by the initdev
=
command). Then run the application and view the Ed-Fi ODS / API using =
Swagger.
The new Profile should be visible:
This section covers additional information and settings useful after dev= elopment is complete.
Profile settings are flexible. With this flexibility comes some complexi= ty =E2=80=94 so platform hosts will want to confirm that the deployed API P= rofiles behave as expected, exposing exactly the right resources. This can = be done manually or using an SDK created by code generation techniques= .
The EdFi_Admin database stores the data required to manage API keys and = secrets, as well as Education Organization and Profile assignments. When th= e API is initialized, the names of the Profiles that have been configured i= nto the API will be published to the Profiles table. This process performs = a one-way publishing and will not remove existing Profile names that are no= longer contained within the API configuration.
The EdFi_Admin tables related to this process are shown below.
The following GitHub link contains source files for this Profile s= ample: