Пример #1
0
 public string getName(string user)
 {
     using (var DB = new Students_Marks_SQLEntities())
     {
         var res = DB.Student_tbl.Where(s => s.StudName == user).First().StudName;
         return(res);
     }
 }
Пример #2
0
        public List <Marks_tbl> GetMarks()
        {
            List <Marks_tbl> lst = new List <Marks_tbl>();

            using (var db = new Students_Marks_SQLEntities())
                lst = db.Marks_tbl.ToList();
            return(lst);
        }
Пример #3
0
 public void AddTest(Marks_tbl mark)
 {
     using (var db = new Students_Marks_SQLEntities())
     {
         db.Marks_tbl.Add(mark);
         db.SaveChanges();
     }
 }
Пример #4
0
        public List <Student_tbl> getStudent()
        {
            List <Student_tbl> lst = new List <Student_tbl>();

            using (var db = new Students_Marks_SQLEntities())
            {
                lst = db.Student_tbl.ToList();
            }
            return(lst);
        }
Пример #5
0
        public List <Answers> getAns()
        {
            List <Answers> lst = new List <Answers>();

            using (var db = new Students_Marks_SQLEntities())
            {
                lst = db.Answers.ToList();
            }
            return(lst);
        }
Пример #6
0
        public List <Questions> getQues()
        {
            List <Questions> lst = new List <Questions>();

            using (var db = new Students_Marks_SQLEntities())
            {
                lst = db.Questions.ToList();
            }
            return(lst);
        }