public IActionResult Add(Writer writer)
        {
            var result = _writerService.Add(writer);

            if (result.Success)
            {
                return(Ok(result));
            }
            return(BadRequest(result));
        }
Exemplo n.º 2
0
        public void WriterRegister(string writerName, string writerSurname, string writerUserName, string writerMail, string writerPassword)
        {
            byte[] passwordHash, passwordSalt;
            HashingHelper.WriterCreatePasswordHash(writerPassword, out passwordHash, out passwordSalt);
            var writer = new Writer
            {
                WriterName         = writerName,
                WriterSurName      = writerSurname,
                WriterUserName     = writerUserName,
                WriterMail         = writerMail,
                WriterPasswordHash = passwordHash,
                WriterPasswordSalt = passwordSalt
            };

            _writerService.Add(writer);
        }
 public ActionResult AddWriter(Writer writer)
 {
     writerManager.Add(writer);
     return(View());
 }