コード例 #1
0
        public async Task <IActionResult> Delete(string id)
        {
            var book = await Task.Run(() => AccountProxy.Get(id));

            if (book == null)
            {
                return(NotFound());
            }
            await Task.Run(() => AccountProxy.Remove(book.Id));

            return(NoContent());
        }
コード例 #2
0
        public IActionResult Delete(string id)
        {
            var book = AccountProxy.Get(id);

            if (book == null)
            {
                return(NotFound());
            }

            AccountProxy.Remove(book.Id);

            return(NoContent());
        }