public async Task <long> AddAsync(VinculadoRequest VinculadoRequest) { var vinculado = new Vinculado { Cedula = VinculadoRequest.Cedula, Nombre = VinculadoRequest.Nombre }; return(await _vinculadoRepo.AddAsync(vinculado)); }
public async Task Post([FromBody] VinculadoRequest vinculadoRequest) { long i = await _vinculadoBusiness.AddAsync(vinculadoRequest); if (i > 0) { try { _emailService.SendEmail(vinculadoRequest.Nombre, _stringLocalizer["EmailSubjectUserRegistered"], _stringLocalizer["EmailBodyUserRegistered", vinculadoRequest.Cedula]).Wait(); } catch (Exception ex) { string url = string.Concat(this.Request.Scheme, "://", this.Request.Host, this.Request.Path, this.Request.QueryString); _logger.LogError(ex, $"Falla al intentar enviar correo de confirmación de registro para {vinculadoRequest.Cedula} en {url}"); } } }
public void Put(long id, [FromBody] VinculadoRequest value) { //for update async throw new NotImplementedException(); }