本文整理汇总了C#中ApplicationDbContext.IntervalsByPoolSeason方法的典型用法代码示例。如果您正苦于以下问题:C# ApplicationDbContext.IntervalsByPoolSeason方法的具体用法?C# ApplicationDbContext.IntervalsByPoolSeason怎么用?C# ApplicationDbContext.IntervalsByPoolSeason使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ApplicationDbContext
的用法示例。
在下文中一共展示了ApplicationDbContext.IntervalsByPoolSeason方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Index
// GET: Team
public ActionResult Index(int id)
{
var model = new TeamViewModel();
using (ApplicationDbContext context = new ApplicationDbContext())
{
var team = context.Teams.Find(id);
model.TeamId = id;
model.RosterPlayersToAdd = new SelectList(team.RosterPlayers.Select(p => p.Player).ToList(), "Id", "LexicalName").ToList();
model.RosterPlayers = team.RosterPlayers.Select(p => new PlayerInterval(p)).OrderBy(p => p, new PlayerIntervalComparer()).ToList();
model.AvailablePlayers = AvailablePlayers(team.PoolId);
model.Intervals = new SelectList(context.IntervalsByPoolSeason(team.PoolId, 2), "Id", "Name").ToList();
//model.PlayerIntervals = GetPlayerIntervals(id, context.IntervalsByPoolSeason(team.PoolId, 1).First().Id).ToList();
model.SelectedIntervalId = GetCurrentInterval();
model.CanSubmit = GetCanSubmit(model.TeamId, model.SelectedIntervalId);
model.SelectedStartTime = GetIntervalStartTime(model.SelectedIntervalId).ToString();
}
return View(model);
}