23 lines
916 B
C#
23 lines
916 B
C#
|
|
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();
|
|||
|
|
}
|
|||
|
|
}
|