Пример #1
0
 public async Task <IActionResult> TLTQuotationAsync([FromBody] TLTQuotationRq model)
 {
     try
     {
         var issuer = GetCurrentUserIdentity <int>();
         return(Ok(await _authService.TLTQuotationAsync(model, issuer)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Пример #2
0
        public async Task <bool> TLTQuotationAsync(TLTQuotationRq model, UserIdentity <int> issuer)
        {
            var user = await _userManager.FindByIdAsync(issuer.Id.ToString());

            if (user == null)
            {
                return(false);
            }
            user.UpdateBy(issuer);
            await _uow.SaveChangesAsync();

            return(true);
        }