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 March 24, 2021 22:05
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;
}