Exemplo n.º 1
0
 public static ChatEntity GetChat(string stock, string owner)
 {
     return(new ChatEntity()
     {
         OwnerNickname = owner,
         Stock = stock,
         CreateDate = InfrastructureFactory.GetMachineDateTime().Now
     });
 }
Exemplo n.º 2
0
        public static UserEntity GetUser(string nickname, string password)
        {
            var hasher   = InfrastructureFactory.GetSha1Hasher();
            var dateTime = InfrastructureFactory.GetMachineDateTime();

            return(new UserEntity()
            {
                Nickname = nickname,
                PasswordSalt = "Salt",
                PasswordHash = hasher.Generate(password, "Salt"),
                CreatedDate = dateTime.Now,
                LastLoginDate = dateTime.Now
            });
        }