TCDev API Generator
  • 😎Welcome!
  • 🧙Lets get started
  • 1️⃣1⃣ Configuration & Setup
    • 🔧Configuration Options
  • 2️⃣2⃣ Database Options
  • 3️⃣3⃣ Create your first API
  • ⁉️Samples
  • Reference
    • 🔧Configuration Options
    • 🤏API Behaviour
    • 🗃️Customizing Database
    • ❗Additional functionality
    • ⭐Hooks & Events
    • 🔓Authentication
Powered by GitBook
On this page
  • Trackable
  • SoftDeletable

Was this helpful?

  1. Reference

Additional functionality

Easy to use helper classes for your APIs

The library comes with a few useful helper classes and interfaces you can use to further reduce boilerplate code.

Trackable

When inheriting from trackable your class is automatically extended by tracking "Created" and "Updated" and is automatically tracking last change date, this gets extended with LastUpdatedBy soon.

Just inherit your class from Trackable like this:

    [Api("/people")] 
    public class Person : Trackable
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public DateTime DateOfBirth { get; set; }
    }

Your class will automatically have creation and last update dates tracked, this will also store the userId of the user when using Authentication

SoftDeletable

Items are not deleted but just marked with "IsDeleted" in the database and are no longer returned via GET calls

....to be continued

PreviousCustomizing DatabaseNextHooks & Events

Last updated 2 years ago

Was this helpful?

❗