Created
August 29, 2012 03:45
-
-
Save lazypower/3506605 to your computer and use it in GitHub Desktop.
vomit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static object OccupationResultsFromAOI(string AreaOfInterest) | |
{ | |
using (var db = new sandboxEntities()) | |
{ | |
var output = (from careermaps in db.CareerMaps | |
where | |
(from occupathbridges in db.OccuPathBridges | |
where | |
(from programcategories in db.ProgramCategories | |
where | |
programcategories.AreaOfInterestInterestID == | |
((from areaofinterests in db.AreaOfInterests | |
where | |
areaofinterests.InterestTitle == AreaOfInterest | |
select new | |
{ | |
areaofinterests.InterestID | |
}).FirstOrDefault().InterestID) | |
select new | |
{ | |
programcategories.CategoryID | |
}).Contains(new { CategoryID = (Int32)occupathbridges.ProgramCategoryID }) | |
group occupathbridges by new | |
{ | |
occupathbridges.OccupationID | |
} into g | |
select new | |
{ | |
OccupationID = (Int32?)g.Key.OccupationID | |
}).Contains(new { careermaps.OccupationID }) | |
select new | |
{ | |
careermaps.OccupationTitle | |
}).Distinct(); | |
if (output != null) | |
{ | |
return (object)output.ToList(); | |
} | |
else | |
{ | |
return null; | |
} | |
} //end using | |
}//end occupation results from aoi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment