public async Task <bool> Add(AddPhoneCodeModel model) { _repository.Create(new PhoneCode { Country = model.Country, Code = model.Code }); await _repository.SaveChangesAsync(); return(true); }
public async Task<IActionResult> Add([FromBody] AddPhoneCodeModel model) { return await MakeActionCallAsync(async () => await _service.Add(model)); }