initial commit

This commit is contained in:
2026-08-04 14:41:21 +03:00
parent 3cb8fcde60
commit 1a1d6186d8
101 changed files with 23239 additions and 0 deletions

View File

@@ -0,0 +1,65 @@
using Microsoft.AspNetCore.Mvc;
using System.Diagnostics;
using Library.Models;
namespace Library.Controllers;
public class HomeController : PageController
{
public HomeController( ILogger<HomeController> logger , IConfiguration configuration )
: base( logger , configuration )
{
}
[Route( "" )]
[Route( "Home/Index" )]
public IActionResult Index( )
{
Trace( "/Home/Index" );
return View( new BasePageModel( GetDBConnection( ) ) );
}
[Route( "Login" )]
public IActionResult Login( )
{
Trace( "/Home/Login" );
return View( new BasePageModel( GetDBConnection( ) ) );
}
[Route( "Sitemap" )]
public IActionResult Sitemap( )
{
Trace( "/Home/Sitemap" );
return View( new BasePageModel( GetDBConnection( ) ) );
}
[Route( "Search" )]
public IActionResult Search( string q , int page )
{
Trace( "/Home/Search" );
return View( new SearchPageModel( GetDBConnection( ) , q , page ) );
}
[Route( "Repository" )]
[Route( "Repository/{id?}" )]
public IActionResult Repository( int id , int page )
{
Trace( "/Home/Repository" );
return View( new RepositoryPageModel( GetDBConnection( ) , id , page ) );
}
[Route( "Repository/Details" )]
[Route( "Repository/Details/{id?}" )]
public IActionResult RepositoryDetails( int id )
{
Trace( "/Home/RepositoryDetails" );
return View( new RepositoryDetailsPageModel( GetDBConnection( ) , id ) );
}
[ResponseCache( Duration = 0 , Location = ResponseCacheLocation.None , NoStore = true )]
public IActionResult Error( )
{
Trace( "/Home/Error" );
return View( new ErrorPageModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier } );
}
}