public IQueryable <MissionView> Disabled() { var models = repo.getAllMissions().Where(m => !m.enabled); var views = MissionView.getViews(models); return(views.AsQueryable()); }
public IQueryable <MissionView> Unemployed() { var models = repo.getAllMissions().Where(m => m.employee == null && m.enabled); var views = MissionView.getViews(models); return(views.AsQueryable()); }
public IQueryable <MissionView> All() { var models = repo.getAllMissions(); var views = MissionView.getViews(models); return(views.AsQueryable()); }
public HttpResponseMessage Missions(int id) { var model = repo.getCategory(id); if (model == null) { return(Request.CreateResponse(HttpStatusCode.NotFound)); } else { var missions = model.missions; var views = MissionView.getViews(missions); return(Request.CreateResponse(HttpStatusCode.OK, views)); } }