public IQueryable <Temp> GetMetaData(string tableName) { switch (tableName) { case "SecurityGroups": SecurityGroup SecurityGroup = new SecurityGroup(); return(SecurityGroup.GetMetaData().AsQueryable()); case "SecurityGroupTypes": SecurityGroupType SecurityGroupType = new SecurityGroupType(); return(SecurityGroupType.GetMetaData().AsQueryable()); case "SecurityGroupCodes": SecurityGroupCode SecurityGroupCode = new SecurityGroupCode(); return(SecurityGroupCode.GetMetaData().AsQueryable()); default: //no table exists for the given tablename given... List <Temp> tempList = new List <Temp>(); Temp temp = new Temp(); temp.ID = 0; temp.Int_1 = 0; temp.Bool_1 = true; //bool_1 will flag it as an error... temp.Name = "Error"; temp.ShortChar_1 = "Table " + tableName + " Is Not A Valid Table Within The Given Entity Collection, Or Meta Data Was Not Defined For The Given Table Name"; tempList.Add(temp); return(tempList.AsQueryable()); } }
public IQueryable <Temp> GetMetaData(string tableName) { switch (tableName) { case "MenuItems": MenuItem menuItem = new MenuItem(); return(menuItem.GetMetaData().AsQueryable()); case "MenuItemTypes": MenuItemType menuItemType = new MenuItemType(); return(menuItemType.GetMetaData().AsQueryable()); case "MenuItemCodes": MenuItemCode menuItemCode = new MenuItemCode(); return(menuItemCode.GetMetaData().AsQueryable()); case "ExecutablePrograms": ExecutableProgram executablePrograms = new ExecutableProgram(); return(executablePrograms.GetMetaData().AsQueryable()); case "ExecutableProgramTypes": ExecutableProgramType executableProgramType = new ExecutableProgramType(); return(executableProgramType.GetMetaData().AsQueryable()); case "ExecutableProgramCodes": ExecutableProgramCode executableProgramCode = new ExecutableProgramCode(); return(executableProgramCode.GetMetaData().AsQueryable()); case "MenuSecurities": MenuSecurity menuSecurity = new MenuSecurity(); return(menuSecurity.GetMetaData().AsQueryable()); case "SecurityGroups": SecurityGroup securityGroup = new SecurityGroup(); return(securityGroup.GetMetaData().AsQueryable()); default: //no table exists for the given tablename given... List <Temp> tempList = new List <Temp>(); Temp temp = new Temp(); temp.ID = 0; temp.Int_1 = 0; temp.Bool_1 = true; //bool_1 will flag it as an error... temp.Name = "Error"; temp.ShortChar_1 = "Table " + tableName + " Is Not A Valid Table Within The Given Entity Collection, Or Meta Data Is Not Publc For The Given Table Name"; tempList.Add(temp); return(tempList.AsQueryable()); } }