I need to list all ceremonies incase of my searchModel parameters are empty. So When the page loaded, we should have a list of multimedia albums of ceremonies. The following method doing generate this list. but I need to show items of my MultimediaViewList in RazorPage one by one. So I should access to the following items and its values in HTML part of my razor page Id,Title,CeremonyId,Ceremony,FileAddress How can I do that?
public Dictionary<string, List<MultimediaViewModel>> Search(MultimediaSearchModel searchModel)
{
var query = _hContext.Multimedias.Include(x => x.Ceremony).Select(g => new MultimediaViewModel
{
Id = g.Id,
Title = g.Title,
CeremonyId = g.CeremonyId,
Ceremony = g.Ceremony.Title,
FileAddress = g.FileAddress
}).GroupBy(g => g.CeremonyId).ToList();
return query.ToDictionary(k => k.Key, v => v.ToList());
}
this is My View Model:
public class MultimediaViewModel
{
public long Id { get; set; }
public string Title { get; set; }
public string FileAddress { get; set; }
public long CeremonyId { get; set; }
public string Ceremony { get; set; }
}
@item.Title
} }` – George Marcus Dec 05 '20 at 15:50@item.Title
}` – George Marcus Dec 06 '20 at 15:52