示例#1
0
        public void WriterAdd(WriterEditDto writerEditDto)
        {
            byte[] passwordHash, passwordSalt;
            HashingHelper.WriterCreatePasswordHash(writerEditDto.WriterPassword, out passwordHash, out passwordSalt);
            var writer = new Writer
            {
                WriterName         = writerEditDto.WriterName,
                WriterSurname      = writerEditDto.WriterSurname,
                WriterMail         = writerEditDto.WriterEmail,
                WriterPasswordHash = passwordHash,
                WriterPasswordSalt = passwordSalt,
                WriterAbout        = writerEditDto.WriterAbout,
                WriterImage        = writerEditDto.WriterImage,
                WriterStatus       = false,
                WriterTitle        = writerEditDto.WriterTitle
            };

            _writerService.WriterAdd(writer);
        }
示例#2
0
        public void WriterRegister(string mail, string password)
        {
            byte[] passwordHash, passwordSalt;
            HashingHelper.WriterCreatePasswordHash(password, out passwordHash, out passwordSalt);
            var writer = new Writer
            {
                WriterMail         = mail,
                WriterPasswordHash = passwordHash,
                WriterPasswordSalt = passwordSalt,
            };

            _writerService.WriterAdd(writer);
        }
示例#3
0
        public void WriterRegister(string name, string surname,
                                   string ımage, string about, string writerMail, string writerPassword, string title,
                                   bool status)
        {
            byte[] passwordHash, passwordSalt;

            HashingHelper.WriterCreatePasswordHash(writerPassword, out passwordHash, out passwordSalt);
            var writer = new Writer
            {
                WriterName         = name,
                WriterSurName      = surname,
                WriterImage        = ımage,
                WriterAbout        = about,
                WriterMail         = writerMail,
                WriterPasswordHash = passwordHash,
                WriterPasswordSalt = passwordSalt,
                WriterTıtle        = title,
                WriterStatus       = status
            };

            _writerService.WriterAdd(writer);
        }