示例#1
0
 public void Add(Selectcourse selectcourse)
 {
     using (var context = new coursecontrolContext())
     {
         context.Selectcourse.Add(selectcourse);
         context.SaveChanges();
     }
 }
示例#2
0
        public Selectcourse Query(int stuid)//
        {
            Selectcourse selectcourse = null;

            using (var context = new coursecontrolContext())
            {
                var test = context.Selectcourse.ToList();
                foreach (var item in test)
                {
                }
                //selectcourse = context.Selectcourse.FirstOrDefault(x => x.StudentId == stuid);
                context.SaveChanges();
            }
            return(selectcourse);
        }