//----------------------------------------------
        //Now the code to alter the book

        public IActionResult ChangePubDate(int id, [FromServices] IChangePubDateService service)
        {
            var dto = service.GetOriginal(id);

            SetupTraceInfo();
            return(View(dto));
        }
예제 #2
0
        public IActionResult ChangePubDate(int bookId, [FromServices] IChangePubDateService service)
        {
            Request.ThrowErrorIfNotLocal();
            var original = service.GetOriginal(bookId);

            SetupTraceInfo();

            return(View(original));
        }
        public IActionResult ChangePubDate                //#A
            (int id,                                      //#B
            [FromServices] IChangePubDateService service) //#C
        {
            Request.ThrowErrorIfNotLocal();               //REMOVE THIS FOR BOOK as it isn't relevant
            var dto = service.GetOriginal(id);            //#D

            SetupTraceInfo();                             //REMOVE THIS FOR BOOK as it could be confusing
            return(View(dto));                            //#E
        }