public async Task DeleteAuthor(int id)
 {
     await _authorsService.DeleteAsync(new Author
     {
         Id = id
     });
 }
示例#2
0
        private void DeleteAuthor()
        {
            var id = _ioHelper.GetIntFromUser("Provide author id");

            //var author = _authorsService.Get(id);
            //_authorsService.Delete(author);

            _authorsService.DeleteAsync(new Author {
                Id = id
            }).Wait();
        }