public void Post([FromBody] string value)
        {
            var p = new Patient
            {
                FirstName       = "Ivan",
                LastName        = "Troelson",
                FName           = "Ivanovich",
                BirthDay        = DateTime.Now,
                Gender          = "male",
                PatientCard     = Guid.NewGuid(),
                TelephoneNumber = "+380952204391",
                OtherTelephones = new List <AdditionalTelephoneNumber> {
                    new AdditionalTelephoneNumber
                    {
                        Description     = "HOME",
                        TelephoneNumber = "+380956004700"
                    }
                }
            };
            var result = _elasticRepository.Update(p);

            if (result)
            {
            }
        }
Exemplo n.º 2
0
        public async Task <IActionResult> UpdateUser(Guid id, User user)
        {
            await _userElasticRepository.Update(id.ToString(), user);

            _logger.LogInformation("User has been updated successfully.");

            return(Ok(Api.Created(user)));
        }