示例#1
0
        static void Main(string[] args)
        {
            var dbContext = new PlutoDbContext();
            var courses = dbContext.GetCourses();   //CREATE PROC [dbo].[GetCourses] AS SELECT* FROM Courses
            foreach (var coursesResult in courses)
            {
                Console.WriteLine(coursesResult.Title);
            }
            Console.WriteLine("--------------");
            var course = new Course();
            course.Level = CourseLevel.Beginner;   //1

        }
        static void Main(string[] args)
        {
            // First part

            //var dbContext = new PlutoDbContext();

            //var courses = dbContext.GetCourses();
            //foreach (var c in courses)
            //{
            //    Console.WriteLine(c.Title);
            //}

            // second part

            var course = new Course();
            course.Level = CourseLevel.Beginner;
        }