public IEnumerable <TeamViewModel> Get(string typeName, int parentId) { int teamTypeId = TeamTypeHelper.GetIdByFiendlyName(typeName); teamBll.FillTeamType = true; teamBll.Active = true; return(teamBll.GetTeamsByTypeAndParent(teamTypeId, parentId).ToViewModel()); }
public IEnumerable <TeamViewModel> Get(string type, [FromQuery] string txt) { teamBll.FillTeamType = true; teamBll.FillCities = true; int teamTypeId = TeamTypeHelper.GetIdByFiendlyName(type); return(teamBll.SearchByTypeDefault(txt, teamTypeId).ToViewModel()); }
public object Get(string typeName, string mode) { switch (mode.ToLowerInvariant()) { case "list": int teamTypeId = TeamTypeHelper.GetIdByFiendlyName(typeName); teamBll.Active = true; return(teamBll.GetTeamsByType(teamTypeId).ToShortViewModel()); } Response.StatusCode = (int)HttpStatusCode.MethodNotAllowed; return(null); }