Files
Backend-Api/ServiceHost/Pages/complaints/Index.cshtml.cs
2025-06-03 16:48:42 +03:30

31 lines
801 B
C#

using CompanyManagment.App.Contracts.ContactUs;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace ServiceHost.Pages.complaints
{
public class IndexModel : PageModel
{
private readonly IContactUsApplication _contactUsApplication;
public IndexModel(IContactUsApplication contactUsApplication)
{
_contactUsApplication = contactUsApplication;
}
public void OnGet()
{
}
public IActionResult OnPostCreateAjax(CreateContactUs command)
{
var operationResult = _contactUsApplication.Create(command);
return new JsonResult(new
{
success = operationResult.IsSuccedded,
message = operationResult.Message
});
}
}
}