Пример #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);
 }