Esempio n. 1
0
        internal static DalUserProfile ToDalUserProfile(OrmUserProfile user)
        {
            if (user != null)
            {
                return new DalUserProfile
                       {
                           Email        = user.Email,
                           Id           = user.Id,
                           Name         = user.Name,
                           Password     = user.Password,
                           Photo        = user.Photo,
                           TimeRegister = user.TimeRegister
                       }
            }
            ;
            return(null);
        }

        #endregion
    }
Esempio n. 2
0
        private static IEnumerable <OrmUserProfile> GetUserProfiles()
        {
            string         path = AppDomain.CurrentDomain.BaseDirectory + "\\fonts\\index.jpg";
            OrmUserProfile userProfile;

            using (FileStream fStream = new FileStream(path, FileMode.Open, FileAccess.Read))
            {
                Byte[] imageBytes = new byte[fStream.Length];
                fStream.Read(imageBytes, 0, imageBytes.Length);
                userProfile = new OrmUserProfile()
                {
                    Photo        = imageBytes,
                    TimeRegister = DateTime.Now,
                    Password     = Crypto.SHA1("000000"),
                    Name         = "vadim",
                    Email        = "*****@*****.**",
                };
            }

            return(new List <OrmUserProfile>
            {
                userProfile
            });
        }