示例#1
0
        public async Task <bool> Add(AddPhoneCodeModel model)
        {
            _repository.Create(new PhoneCode
            {
                Country = model.Country,
                Code    = model.Code
            });
            await _repository.SaveChangesAsync();

            return(true);
        }
示例#2
0
 public async Task<IActionResult> Add([FromBody] AddPhoneCodeModel model)
 {
     return await MakeActionCallAsync(async () => await _service.Add(model));
 }