Skip to content

Instantly share code, notes, and snippets.

View arruw's full-sized avatar
Aaaaaaa...

mmav arruw

Aaaaaaa...
  • Earth
View GitHub Profile
@arruw
arruw / ApiController.cs
Last active January 15, 2025 14:18
ASP.NET Core - Generic web API controller with generic repository pattern (created on, modified on, soft delete) ... view demo https://github.com/matjazmav/generic-api
[Authorize]
[Route("api/[controller]")]
public abstract class ApiController<T> : Controller where T : class, IEntity
{
private IApplicationRepository<T> _repository;
public ApiController(IApplicationRepository<T> repository)
{
_repository = repository;
}