示例#1
0
        public async Task ShouldDeleteEntry()
        {
            await _service.DeleteByIdAsync(_routeId);

            var route = await _service.GetByIdAsync(_routeId);

            Assert.Null(route);
        }
示例#2
0
        public async Task <IActionResult> DeleteByIdAsync(
            [Range(1, int.MaxValue, ErrorMessage = ErrorConstants.IdLessThanOneError)]
            [FromRoute] int id)
        {
            await _routeService.DeleteByIdAsync(id);

            return(NoContent());
        }
示例#3
0
 public async Task Delete(int id)
 {
     await _routeService.DeleteByIdAsync(id);
 }