Inheritance: MutableEntityBase
Ejemplo n.º 1
0
        public EmailResult SendWelcomeMessage(Member member)
        {
            var model = new MailWelcomeModel
            {
                To = member.EmailAddress
            };

            To.Add(model.To);
            Subject = "Welcome to StarterTemplate";
            return Email("Welcome", model);
        }
Ejemplo n.º 2
0
        public Member SignUp(string username, string emailAddress, string password)
        {
            var member = new Member
            {
                Username = username,
                EmailAddress = emailAddress,
                PasswordHash = HashPassword(password),
                LastLoginDate = DateTime.Now
            };

            _repository.Add(member);
            _repository.SaveChanges();

            return member;
        }