public IQueryable <Temp> GetMetaData(string tableName) { switch (tableName) { case "SystemUsers": SystemUser item = new SystemUser(); return(item.GetMetaData().AsQueryable()); case "SystemUserTypes": SystemUserType itemType = new SystemUserType(); return(itemType.GetMetaData().AsQueryable()); case "SystemUserCodes": SystemUserCode itemCode = new SystemUserCode(); return(itemCode.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 "SystemUsers": SystemUser systemUser = new SystemUser(); return(systemUser.GetMetaData().AsQueryable()); case "SystemUsersTypes": SystemUserType systemUserTypes = new SystemUserType(); return(systemUserTypes.GetMetaData().AsQueryable()); case "SystemUserCodes": SystemUserCode systemUserCode = new SystemUserCode(); return(systemUserCode.GetMetaData().AsQueryable()); case "SystemUserSecurities": SystemUserSecurity systemUserSecurity = new SystemUserSecurity(); return(systemUserSecurity.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()); } }