예제 #1
0
        static void Main(string[] args)
        {
            StudyEntities studyEntities = new StudyEntities();

            QueryWithIEnumerable(studyEntities);
            QueryWithIQueryable(studyEntities);

            Console.ReadLine();
        }
예제 #2
0
        static void QueryWithIQueryable(StudyEntities studyEntities)
        {
            IQueryable <PROJECT_TEAM> projects =
                studyEntities.PROJECT_TEAM.Where(e => e.PRJ_ID.Equals("TAAGUNG"));

            projects = projects.Take(1);
            Console.WriteLine(projects.ToString());

            foreach (var project in projects)
            {
                Console.WriteLine(project.FRST_NM + " " + project.LAST_NM);
            }
        }