示例#1
0
 public static ChatEntity GetChat(string stock, string owner)
 {
     return(new ChatEntity()
     {
         OwnerNickname = owner,
         Stock = stock,
         CreateDate = InfrastructureFactory.GetMachineDateTime().Now
     });
 }
示例#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
            });
        }