public IActionResult Get(GetTeamsQueryParameters parameters) { var result = _getTeamsQuery.Query(parameters); if (result.Teams == null || result.Teams.Count() == 0) { return(NotFound()); } return(Ok()); }
public GetTeamsQueryResult Query(GetTeamsQueryParameters parameters) { var dataAccessResult = _dataAccess.Query(new GetTeamsQueryDataAccessInput() { Name = parameters.Name, Description = parameters.Description }); return(new GetTeamsQueryResult() { Teams = dataAccessResult.Select(t => new GetTeamsQueryResult.TeamModel() { Name = t.Name, Desciption = t.Description, CreateSharePointSite = t.CreateSharePointSite, CreateTeamsChannel = t.CreateTeamsChannel }) }); }