// GET /api/customers/1 public IHttpActionResult Get(int id) { var team = _context.Teams.SingleOrDefault(c => c.Id == id); if (team == null) { return(NotFound()); } var teamDto = _factory.FromTeamToDto(team); return(Ok(teamDto)); }
public ActionResult Edit(int?id) { var team = _context.Teams.SingleOrDefault(t => t.Id == id); if (team == null) { return(HttpNotFound()); } TeamDto dto = _factory.FromTeamToDto(team); return(View("TeamForm", dto)); }