System.Web.Http.HttpResponseException was unhandled by user code >> HResult=-2146233088 >> Message=Processing of the HTTP request resulted in an exception. Please see the HTTP response returned by the 'Response' property of this exception for details. >> Source=IBCPackageTracking.Web >> StackTrace: >> at IBCPackageTracking.Web.Controllers.ScanCodesController.Get(Int32 id) in d:\Documents\Visual Studio 2013\Projects\IBCPackageTracking.Web\IBCPackageTracking.Web\Controllers\ScanCodesController.cs:line 31 >> at lambda_method(Closure , Object , Object[] ) >> at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass13.<GetExecutor>b__c(Object instance, Object[] methodParameters) >> at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments) >> at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.<>c__DisplayClass5.<ExecuteAsync>b__4() >> at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func`1 func, CancellationToken cancellationToken) >> InnerException: >>>>
// GET api/scancodes >> public IEnumerable<ScanCode> Get() >> { >> return Uow.ScanCodes.GetAll().OrderBy(s => s.scn_desc); >> } >> >> // GET api/scancodes/5 >> public ScanCode Get(int id) >> { >> var scanCode = Uow.ScanCodes.GetById(id); >> if (scanCode != null) return scanCode; >> throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.NotFound)); >> }>>