示例#1
0
        public async Task <PopularResult> DeleteAsync(int id)
        {
            var result    = new PopularResult();
            var insurance = await _insuranceRepository.GetAsync(id);

            if (insurance == null)
            {
                result.Failed("数据不存在");
                return(result);
            }
            insurance.Delete();
            await _insuranceRepository.UpdateAsync(insurance);

            return(result);
        }