divan/GanjooRazor/Pages/_MultipleQuotedPoemsPartial.cshtml.cs
2024-01-05 09:26:40 +03:30

28 lines
831 B
C#

using Microsoft.AspNetCore.Mvc.RazorPages;
using RMuseum.Models.Ganjoor.ViewModels;
namespace GanjooRazor.Pages
{
public class _MultipleQuotedPoemsPartialModel : PageModel
{
public GanjoorQuotedPoemViewModel[] GanjoorQuotedPoems { get; set; }
public string PoetImageUrl { get; set; }
public string PoetNickName { get; set; }
public bool CanEdit { get; set; }
public _QuotedPoemPartialModel GetQuotedPoemModel(GanjoorQuotedPoemViewModel quotedPoem, string poetImageUrl, string poetNickName)
{
return new _QuotedPoemPartialModel()
{
GanjoorQuotedPoemViewModel = quotedPoem,
PoetImageUrl = poetImageUrl,
PoetNickName = poetNickName,
CanEdit = CanEdit,
};
}
}
}