Exemple #1
0
        public IHttpActionResult GetByAccountId(string id)
        {
            List <Team>       teams = new List <Team>();
            List <Membership> mems  = MemLogic.GetByAccount(id).Where(e => e.Status == MembershipStatus.Member || e.Status == MembershipStatus.Admin).ToList();

            foreach (Membership m in mems)
            {
                teams.Add(Logic.Get(m.TeamId));
            }
            return(Ok(teams));
        }
        public IHttpActionResult ByAccount(string id)
        {
            IQueryable <Membership> membership = Logic.GetByAccount(id);

            if (membership == null)
            {
                return(NotFound());
            }

            return(Ok(membership.ToList()));
        }