public IHttpActionResult RemoveInvitationByEmail(EmailSearchModel model, int projectId)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            _repo.RemoveInvitationByEmail(model.email);

            return Ok();
        }
Ejemplo n.º 2
0
 public IEnumerable FindUserByUsername(EmailSearchModel email)
 {
     var query = from user in db.AspNetUsers
                 join info in db.UserInfos
                     on user.Id equals info.User_FK
                 where user.UserName == email.email
                 select new
                 {
                     firstname = info.firstname,
                     lastname = info.lastname,
                     email = user.UserName
                 };
     return query.ToList();
 }
Ejemplo n.º 3
0
        public IHttpActionResult GetUserByEmail(EmailSearchModel email)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            IEnumerable user = _userrepo.FindUserByUsername(email);

            foreach(var us in user)
            {
                List<Object> array = new List<object>();
                array.Add(us);
                return Ok(array);
            }
             return BadRequest();

        }
        public IHttpActionResult PostProjects(EmailSearchModel email, int projectId)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            _userprojectrel.RemoveRelByEmail(email.email);


            return Ok();
        }