public void FindTest() { GetAirplaneByIdCommand command = CommandFactory.GetFindPlaneIdCommand(1); command.Execute(); Assert.NotNull(command.GetResult()); }
public ActionResult <Entity> Find(int id) { try { GetAirplaneByIdCommand command = CommandFactory.GetFindPlaneIdCommand(id); command.Execute(); // var result = AirplanesRepository.Find(id); return(Ok(command.GetResult())); } catch (DbErrorException ex) { return(BadRequest(new { ex.Message })); } catch (Exception) { return(null); } }