Files
monorepo/LCU.API.Internal.Dispatcher
2026-04-22 16:34:14 +00:00
..
2026-04-22 09:52:00 -05:00
2026-04-22 09:52:00 -05:00
2026-04-22 16:17:12 +00:00
2026-04-22 16:17:12 +00:00
2026-03-24 15:26:03 -05:00
2026-04-22 16:34:14 +00:00
2026-04-22 15:01:09 +00:00
2026-03-24 15:26:03 -05:00
2026-03-24 15:26:03 -05:00
2026-03-24 15:26:03 -05:00
2026-03-24 15:26:03 -05:00
2026-03-24 15:26:03 -05:00

Steps to Add New WorkItem to Existing Setup Api

  1. Add new ActionType
    a. Location: LCU.Library.Internal.DispatcherModels Library --> Enums namespace --> ActionType.cs class
    b. Should add number the enum correlates to and to make sure to use the next number inline.
  2. Update the API's Nuget version in LCU.Api.Internal.DispatcherSharedLib Library.
    a. Right click on LCU.Api.Internal.DispatcherSharedLib Library and select Manage Nuget Packages.
    b. Find API which will be updated.
    c. Update
  3. Add Configuration to API's Configuration Class
    a. Location: LCU.Api.Internal.DispatcherSharedLib Library --> Configurations namespace--> ..Configuration.cs class
    b. Add new Endpoint Property
    c. Add NotMapped Url Property
  4. Add new Endpoint to API's Configuration to Appsettings.
  5. Add new ActionService Build to switch.
    a. Location: LCU.Api.Internal.DispatcherSharedLib Library --> BuilderServices namespace --> ActionBuilderService.cs class --> BuildAction method
    b. Add to #region for API. Example #Region FileOperationsApi.
    c. Add new switch following the existing switch's pattern.
  6. Add new unit test to the ActionBuildServiceTest.
  7. Update Version/Description/PackageReleaseNotes LCU.Api.Internal.DispatcherSharedLib.
    a. Increase by 0.0.1 for new WorkItems.
  8. Update Version/Description/PackageReleaseNotes LCU.Library.Internal.DispatcherModels.
    a. Increase by 0.0.1 for new ActionTypes.
  9. Add new endpoint to Release Variables.
    a. Set variable to be release.

Steps to Add New WorkItem to New API Setup

  1. Add new ActionType
    a. Location: LCU.Library.Internal.DispatcherModels Library --> Enums namespace --> ActionType.cs class
    b. Should add number the enum correlates to and to make sure to use the next number inline.
  2. Install the new API's Nuget version in LCU.Api.Internal.DispatcherSharedLib Library.
    a. Right click on LCU.Api.Internal.DispatcherSharedLib Library and select Manage Nuget Packages.
    b. Find API which will be installed.
    c. install
  3. Create new Configurations class for new API
    a. Location: LCU.Api.Internal.DispatcherSharedLib Library --> Configurations namespace--> ..Configuration.cs class
    b. Add URL Property
    c. Add New Endpoint Property
    d. Add NotMapped URL Property that will be URL + Endpoint. Follow already existing Configration classes as example.
  4. Add new Endpoint to API's Configuration to Appsettings.
  5. Bind New Configration Model in DependencyInjection.cs
    a. Location: LCU.Api.Internal.DispatcherSharedLib --> DependencyInjection.cs
  6. Add new ActionService Build to switch.
    a. Location: LCU.Api.Internal.DispatcherSharedLib Library --> BuilderServices namespace --> ActionBuilderService.cs class --> BuildAction method
    b. Pull in new Configration class.
    c. Create new #region for API. Use #Region FileOperationsApi as an example.
    d. Add new switch following the existing switch's pattern.
  7. Add new Region for Api and new unit test to the ActionBuildServiceTest.
  8. Update Version/Description/PackageReleaseNotes LCU.Api.Internal.DispatcherSharedLib.
    a. Increase by 0.0.1 for new WorkItems.
  9. Update Version/Description/PackageReleaseNotes LCU.Library.Internal.DispatcherModels. Increase by 0.0.1 for new ActionTypes.
    a. Increase by 0.0.1 for new ActionTypes.
  10. Add new URL and new endpoint to Release Variables.
    a. Set variable to be release.
    b. Set each URL appropriately for each environment

Notes: - Only HttpMethodType.Post is set up to be used. - The model being added needs to have extend the ReturnResponse model - Will need to add the QueueReturnResponse.QueueResponse([Model]) to the API upon completion.

#Filter and Sorting Filtering and sorting are handled by creating IQueryable and IEnumarable classes/methods. IQueryable is the preferred route as it will utilize the power of the database querying rather than filtering/sorting after the data has been gathered. Only use IEnumarable if it is more complicated to write the linq statement then already written C# code.

Once a Filter Property and a IQueryable/IEnumarable class/method are created you will just need to append in the desired entities repository method in which is being filtered.

Adding Filtering Steps:

  1. Add new property to Filter model. Use another model if needed more information.
  2. Create IQueryable/IEnumarable classes/methods in the proper namespaces.
  3. Append new method to your context query call or after if using an IEnumarable.
  4. Test

Adding Sorting Steps:

  1. Add string constant
  2. Add string constant to list of constants.

Steps to setup local database

  1. Download and install Sql Server 2022 Developer edition
  2. Right click the LCU.Api.Internal.DispatcherSql project and select the Publish option
  3. Click Edit in the Target Database Connection Settings. Use the following settings: Server Name: localhost Authentication: Windows Authentication User Name: LCU\YOUR NAME (This should already be populated) Password: Database Name: master
  4. Test connection and ensure it was successful. Click Ok. The target database connection will now be populated.
  5. Enter Dispatcher for Database Name
  6. Enter LCU.Api.Internal.DispatcherSql.sql for Publish Script Name
  7. Click Publish. You now have a local sql server setup with the dispatcher database.
  8. You can download and install sql management studio to view database locally.