Example #1
0
 public IHttpActionResult PostAdminApprove(User1 user)
 {
     try
     {
         var userDetails = this.unit._userRepository.SelectAll().Where(x => x.Id == user.Id).FirstOrDefault();
         userDetails.IsValidated = true;
         this.unit._userRepository.Update(userDetails);
         this.unit.Commit();
     }
     catch (Exception ex)
     {
         ErrorLog.Log(ex);
     }
     return(Ok(true));
 }
Example #2
0
        public IHttpActionResult GetUserList()
        {
            List <User1> user = new List <User1>();

            try
            {
                var userList = this.unit._userRepository.SelectAll().Where(x => x.IsValidated == false).ToList();
                userList.ForEach(a =>
                {
                    User1 us    = new User1();
                    us.Id       = a.Id;
                    us.Email    = a.Email;
                    us.IsActive = a.IsActive;
                    user.Add(us);
                });
            }
            catch (Exception ex)
            {
                ErrorLog.Log(ex);
            }
            return(Ok(user));
        }