Boy_Scouts_Scheduler.Controllers.TimeSlotController.GridData C# (CSharp) Méthode

GridData() public méthode

public GridData ( string orderBy = "ID", bool desc = false ) : System.Web.Mvc.ActionResult
orderBy string
desc bool
Résultat System.Web.Mvc.ActionResult
        public ActionResult GridData(string orderBy = "ID", bool desc = false)
        {
            Response.AppendHeader("X-Total-Row-Count", db.TimeSlots.Count(t => t.Event.ID == eventID).ToString());
            ObjectQuery<TimeSlot> timeslots = (db as IObjectContextAdapter).ObjectContext.CreateObjectSet<TimeSlot>();
            timeslots = timeslots.OrderBy("it." + orderBy + (desc ? " desc" : ""));

            return PartialView(timeslots.Where(t => t.Event.ID == eventID));
        }