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