API Project Structure Overview

NEW: API Documentation for LymeTemplateApi generated from code comments can be found here.

Name Description
LymeTemplateApi This is the Dotnet WebApi project that contains the website project to be hosted on your web server.
LymeTemplate.Code This class library is used to store business logic and reusable helper classes that help with common business app development scenarios.
LymeTemplate.Console This console application is currently only used to assist with build related activities, but can be extended and deployed to your web server to perform other tasks.
LymeTemplate.Data Contains the Entity Framework Data Context that ties the Model Classes to the SQL Server Database. It also contains any SQL scripts to be deployed to other environment during the build process.

LymeTemplateApi Project

Screenshot of Solution Explorer

Name Description
Properties This folder contains the launchSettings.json file for debug configurations as well as the Publish Profiles that are used for the dotnet publish command used when building the app for deployment.
wwwroot Static files that are served at the root level of the API's hosted URL location.
Code General C# class libraries that likely will be moved into the code project in the future.
Controllers These Controller files contain all the code that serve as API endpoints for the app. Most of the endpoints. For more details about how most of the endpoints are structured, see the Anatomy of a Feature page.
Hubs SignalR Hubs used for real time communciation with the API. (Not yet listed in screenshot above)
appsettings.json The WebApi configuration settings file. For more details about the settings in this file, see the appsettings.json Docs.
LymeTemplate.nuspec The Nuget specification file used during the CI/CD Build Process.
Program.cs The API's main program file. In this file, the plumbing for routing, error handling and authentication / authorization can be found here.
web.config Built in by the standard dotnet core web project web.config file.

LymeTemplateApi.Code Project

Screenshot of Solution Explorer

Name Description
Automation/TaskRunnerBase.cs This file is intended to serve as a helper base class for the creation of system automation endpoints.
ExtensionMethods/IntTo2Digits.cs This method extends the int data type to a 2 digit fixed string. For example: 2.To2Digits() Output: "02"
ExtensionMethods/LatLngExtensions.cs Helps with geocoding.
ExtensionMethods/OrderByField.cs This extension method extends the IQueryable data type to allow for the sorting of a query using a string input for the sort field.
ExtensionMethods/StringExtensions.cs This class contains several extension methods to transform strings into different case patterns (e.g. Pascal Case, Camel Case, Snake/Pipe Case)
QuickLaunch/QuickSearch.cs This class contains the logic the forms a query that is submitted by the Quick Launch app launcher UI.
Tools/DynamicExportToExcel.cs This class helps to convert an enumerable list of objects and export them to an Excel Workbook (xlsx)
Tools/PropertyCopy.cs Helps to shallow copy property values in .NET using reflection.
Tools/SearchResultsHelper.cs Helps to search paginated results from SEARCH HttpPost endpoints on generic features.
Tools/SqlBuilder.cs Builds a SQL exec command from a stored procedure name and list of SQL Parameters.
Tools/SqlHelper.cs Microsoft Data Access Application Block for .NET circa year 2001. Can be handy for old ADO.NET operations.
AddressHelper.cs This utility class helps to work with Addresses and also helps to geocode addresses using openstreetmap.org.
ConfigHelper.cs This class helps with assembling the App Config that is shared between the APP and the API.
EmailHelper.cs This class is used for sending messages from the application. By default, messages and their attachments will be logged to the EmailMessage and EmailMessageAttachment tables and can be viewed by the Email Message Logs admin feature.
FileDownloads This file creates DownloadToken to support Secure File Downloads.
MailMergeHelper.cs Hardcoded file that assists with injecting dynamic data into email messages that are formed using Email Templates and applying Branding to this correspondence.
SecurityHelper.cs This static class has methods in it that assist with accessing user security and role information.
StringFormatting.cs A miscellaneous collection of static methods that assist with the formatting of specially formatted strings. Methods available: FormatPhone, FormatDate, StripIllegalFileCharacters, FormatPotentiallyLargeNumber, GetTimeStampString, GetMonthFolderName, AddOrdinal

LymeTemplateApi.Console App Project

Solution Explorer for Console App

Name Description
Models Folder containing C# POCO classes that are serialized from TeamCity API JSON data.
ChangeLogDataGatherer.cs C# scipt that connects to the TeamCity API to gather changes that are output into changeLog.json file that is used by the App Change Log feature..
CreateChangeLog.ps1 Powershell script designed to work with Octopus Deployment software which invokes the ChangeLogDataGatherer program described above.
LymeTemplateApi.Console.nuspec The Nuget specification file used during the CI/CD Build Process.

LymeTemplate.Data Project

Solution Explorer for Data Project

Name Description
_SQL Files Folder containing SQL files used for deployment to other environments.
DataContext.cs Entity Framework DataContext used to tie C# Models to the database as well as perform customizations to the data models using the built-in OnModelCreating method override.

You can add additional DataContext files in this project for access to additional databases.

LymeTemplate.Models Project

Solution Explorer for Data Project

Name Description
C# Files in the Root folder Unless otherwise noted, files in the root folder of this project are C# entity classes that map to tables in our SQL database.
-- MyGenerationSpec.cs Classes referenced in this file will be picked up by the DotnetTypegen TypeScript class generation, which create TypeScript model files for the front-end application.
tgconfig.json Dotnet TypeGen tool configuration.
Api This folder contains models used by the API, but do not map back to database tables.
AppConfig Models that map to properties defined in the appsettings.json Config File.
AppHealth Models that are used for the App Health feature
Invoicing Models that are used for the Invoicing / Payment feature. These models do map to database tables.
QuickSearch Models used for the Quick Search functionality.