Exemple #1
0
        public async Task <IHttpActionResult> GetTasksTeam(int id)
        {
            var query = from us in db.Tasks
                        where us.IdTeam == id
                        select us;
            IQueryable <Tasks> ret = query.AsQueryable();

            if (ret.Count() == 0)
            {
                return(NotFound());
            }
            retTa p = new retTa();

            p.ListTasks = ret;
            return(Ok(p));
        }
Exemple #2
0
        public async Task <IHttpActionResult> GetTasksTeamUser(int id, int idU)
        {
            var query = from us in db.Tasks join tm in db.TeamMembers on us.IdAssigned equals tm.Id
                        where us.IdTeam == id && tm.IdUser == idU
                        select us;
            IQueryable <Tasks> ret = query.AsQueryable();

            if (ret.Count() == 0)
            {
                return(NotFound());
            }

            retTa a = new retTa()
            {
                ListTasks = ret
            };

            return(Ok(a));
        }