Hi!
This is the source of my app.:
CourseDriver.cs:
using Course2.Models;
using Orchard.ContentManagement;
using Orchard.ContentManagement.Drivers;
using System.Linq;
namespace Course2.Drivers
{
public class CourseDriver : ContentPartDriver<CoursePart>
{
protected override DriverResult Display(CoursePart part, string displayType, dynamic shapeHelper)
{
return ContentShape("Parts_Course", () => shapeHelper.Parts_Course(
Name: part.Name,
Target: part.Target,
Day: part.Day,
Hour: part.Hour,
Place: part.Place));
}
Hozzá tartozó View - Course.cshtml:
<fieldset>
<legend>@Model.Name</legend>
<br />
<div class="display-label">Target: @Model.Target</div>
<br />
<div class="display-label">Day: @Model.Day</div>
<br />
<div class="display-label">Hour: @Model.Hour</div>
<br />
<div class="display-label">Place: @Model.Place</div>
</fieldset>
I want to do a query, that displays the names of all courses.
Any idea about this?