Files
abzarasadi/Pages/Brands/Detail.cshtml.cs
T
Soroush Asadi f97f891d67
CI/CD / CI — dotnet build (push) Successful in 44s
CI/CD / Deploy — docker compose (push) Failing after 1s
Initial commit — AsadiTools v1.0
Full ASP.NET Core 10 Razor Pages app for آساد ابزار tool repair shop
in Karaj, Iran (official DeWalt representative).

Features:
- Homepage, Services, DeWalt page, Shop (pagination + images)
- 10 brand SEO pages (/brands/*) with rich Persian content + FAQ schema
- Blog engine with admin management (/blog, /Admin/Blog)
- Cart, Checkout, Contact (OpenStreetMap embed)
- Admin panel: Products CRUD, Orders, Blog, Change Password
- Jalali date formatting, product images, SiteData centralised contact
- Docker + docker-compose with healthcheck
- Gitea CI/CD via .gitea/workflows/ci-cd.yml (NuGet through Nexus mirror)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01 22:08:43 +03:30

23 lines
916 B
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using AsadiTools.Services;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace AsadiTools.Pages.Brands;
public class BrandDetailModel : PageModel
{
public BrandSeoPage? Brand { get; private set; }
public IActionResult OnGet(string brand)
{
Brand = BrandSeoData.AllBrands.FirstOrDefault(b =>
b.Id.Equals(brand, StringComparison.OrdinalIgnoreCase));
if (Brand is null) return NotFound();
ViewData["Title"] = $"تعمیر ابزار {Brand.NameFa} در کرج | آساد ابزار{(Brand.IsOfficial ? " نمایندگی رسمی" : "")}";
ViewData["Description"] = $"تعمیر تخصصی ابزار {Brand.NameFa} در کرج با ضمانت ۳ ماهه. قطعات اصل، تکنیسین مجاز. {string.Join("، ", Brand.RepairServices.Take(3))}. تماس: ۰۲۶-۳۴۵۶۷۸۹۰";
return Page();
}
}