¡@

Home 

c# Programming Glossary: animaldatacontext

yield return statement inside a using() { } block Disposes before executing

http://stackoverflow.com/questions/1539114/yield-return-statement-inside-a-using-block-disposes-before-executing

works fine public static IEnumerable Animal GetAllAnimals AnimalDataContext dataContext new AnimalDataContext return dataContext.GetAllAnimals.. Animal GetAllAnimals AnimalDataContext dataContext new AnimalDataContext return dataContext.GetAllAnimals And the implementation of.. And the implementation of the GetAllAnimals method in the AnimalDataContext below public IEnumerable Animal GetAllAnimals foreach var animalName..