Skip to content

Instantly share code, notes, and snippets.

Avatar

Azamat Kurbanaev azkurban

View GitHub Profile
@azkurban
azkurban / ApiController.cs
Created Feb 5, 2021 — forked from matjazmav/ApiController.cs
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
View ApiController.cs
[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;
}
@azkurban
azkurban / ApiController.cs
Created Feb 5, 2021 — forked from matjazmav/ApiController.cs
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
View ApiController.cs
[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;
}
@azkurban
azkurban / Gobal.asax.cs
Created Dec 29, 2016 — forked from shammelburg/Gobal.asax.cs
Angular2 + Windows Authentication
View Gobal.asax.cs
protected void Application_BeginRequest()
{
if (Request.Headers.AllKeys.Contains("Origin") && Request.HttpMethod == "OPTIONS")
{
Response.Flush();
}
}