Exemplo n.º 1
0
        public IActionResult Save(PersonAddressDto model)
        {
            bool success;

            model = model.Id == 0 ? _personAddressApiClient.PostPersonAddress(model).Result
                : _personAddressApiClient.PutPersonAddress(model.Id, model).Result;
            success = string.IsNullOrWhiteSpace(model.ErrorMessage);
            return(Json(new { success, message = success ? model.SuccessMessage : model.ErrorMessage }));
        }
Exemplo n.º 2
0
 public async Task <PersonAddressDto> PutPersonAddress(int id, PersonAddressDto model)
 {
     return(await _personAddressApiClient.PutPersonAddress(id, model));
 }