public IActionResult GetMission(int id) { var result = _missRepo.Get(id); if (result.Success) { return(Ok(result.Data)); } else { return(BadRequest(result.Messages)); } }
public IActionResult GetMission(int id) { var response = missionRepo.Get(id); if (response.Success) { return(Ok(new { MissionId = response.Data.MissionId, CodeName = response.Data.CodeName, StartDate = response.Data.StartDate, ActualEndDate = response.Data.ActualEndDate, ProjectedEndDate = response.Data.ProjectedEndDate, OperationalCost = response.Data.OperationalCost, Notes = response.Data.Notes })); } else { return(BadRequest()); } }
public ActionResult <Mission> GetMissions() { var missions = _missionRepository.Get().ToList(); return(Ok(missions)); }