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());
        }
Example #4
0
        public HttpResponseMessage Missions(int id)
        {
            var model = repo.getEmployee(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));
            }
        }