Exemplo n.º 1
0
        public List <UserTable> GetAllUser()
        {
            var toReturn = new List <UserTable>();

            try
            {
                using (var db = new connectionsLinqDataContext())
                {
                    var temp = db.GetAllUser().ToList();
                    foreach (var v in temp)
                    {
                        UserTable toAdd             = ConvertToUser(v);
                        var       decryptedpassword = PasswordSecurity.Decrypt("securityPassword", toAdd.password, false);

                        toAdd.password = decryptedpassword;
                        toReturn.Add(toAdd);
                    }
                    return(toReturn);
                }
            }
            catch (Exception)
            {
                return(null);
            }
        }