AUA Framework Training — Episode 12

Built-in Methods & Architecture Overview

Exploring Entity Service Execution Forms, Core Framework Benefits, and Modern Design Principles in AUA

Watch Video on YouTube

Entity Service Execution Forms

All built-in data manipulation methods within AUA Entity Services are available in three powerful execution forms to optimize performance, concurrency, and thread management:

1. Asynchronous
2. Synchronous
3. Async with CancellationToken

Core Built-in Service Methods

Insert Operations

Includes Insert(dto/entity), InsertAsync(...), custom view model injection (InsertCustomVm), partial saving via PartialInsert, and batch operations (InsertMany / InsertManyAsync).

Delete & TryDelete Operations

Includes standard deletion by ID, DTO, or entity instance, asynchronous variants, and TryDelete functions that safely return a boolean status indicating execution success.

Modern Architecture Principles

AUA is engineered using cutting-edge design concepts to guarantee maintainability, high performance, and structured modular expansion:

Clean Architecture Clean Code Domain-Driven Design (DDD) Lmax Architecture SOLID Principles Code Refactoring GRASP Principles

Key Framework Infrastructures

  • Service and reporting infrastructure with unified naming patterns.
  • Built-in caching layers (In-Memory) and security/encryption handlers.
  • Advanced modeling, mapping, and user access control levels.
  • Pre-tested modules minimizing developer overhead and error rates.

Built-in Service Methods & CancellationToken Examples

StudentService.cs

Below are practical code implementations showing how to invoke AUA built-in generic CRUD operations using Async, CancellationToken, and TryDelete directly within your business services:

public class StudentService : GenericEntityService<Student, StudentDto>, IStudentService
{
    public StudentService(IUnitOfWork unitOfWork) : base(unitOfWork) { }

    // 1. Async Insert with DTO & CancellationToken Support
    public async Task<long> CreateStudentAsync(StudentDto dto, CancellationToken cancellationToken = default)
    {
        // Automatically maps DTO to Entity and persists to DbContext
        var studentId = await InsertAsync(dto, cancellationToken);
        return studentId;
    }

    // 2. Batch Processing using InsertManyAsync
    public async Task AddMultipleStudentsAsync(IEnumerable<StudentDto> studentDtos)
    {
        await InsertManyAsync(studentDtos);
    }

    // 3. Safe Deletion returning Boolean status via TryDeleteAsync
    public async Task<bool> RemoveStudentIfExistsAsync(long studentId)
    {
        bool isDeleted = await TryDeleteAsync(studentId);
        return isDeleted;
    }
}
“
”
"If you think good architecture is expensive, try bad architecture."
AUA Framework Philosophy

Official Channels & Community

Connect with the AUA Framework ecosystem.

Episode 12 Completed Business Services