Files
constructdemo/ConstructorAppUI/ViewComponents/HomeComponents/_HomeContactUsPartialComponent.cs
2025-05-01 15:18:30 +03:00

26 lines
718 B
C#
Raw Permalink 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 ConstructorAppUI.Dtos.ContactUsDtos;
using Microsoft.AspNetCore.Mvc;
namespace ConstructorAppUI.ViewComponents.HomeComponents
{
public class _HomeContactUsPartialComponent : ViewComponent
{
private readonly string _apiBaseUrl;
public _HomeContactUsPartialComponent(IConfiguration configuration)
{
_apiBaseUrl = configuration["ApiSettings:BaseUrl"];
}
public IViewComponentResult Invoke()
{
// ViewBag ile API base URL'sini taşıyoruz
ViewBag.ApiBaseUrl = _apiBaseUrl;
var model = new CreateContactUsDto(); // Formu boş model ile başlatıyoruz
return View(model);
}
}
}