using AsadiTools.Services;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace AsadiTools.Pages.Services;

public class BrandModel : PageModel
{
    public BrandInfo? Brand { get; private set; }

    public void OnGet(string id)
    {
        Brand = SiteData.Brands.FirstOrDefault(b => b.Id == id);
        if (Brand is not null)
            ViewData["Description"] = $"{Brand.Description} تعمیر {string.Join("، ", Brand.Services)} {Brand.NameFa} در کرج.";
    }
}
