public ActionResult M1() { StudiesContext context = new StudiesContext(); var kérdések = from x in context.Instructors select x.InstructorSk; return(new JsonResult(kérdések)); }
public int M4() //Tetszőleges metódusnév { StudiesContext context = new StudiesContext(); int kérdésekSzáma = context.Instructors.Count(); return(kérdésekSzáma); }
public void Post([FromBody] Instructor ÚjOktató) { StudiesContext context = new StudiesContext(); context.Instructors.Add(ÚjOktató); context.SaveChanges(); }
public void Delete(int id) { StudiesContext context = new StudiesContext(); var törlendőOktató = (from x in context.Instructors where x.InstructorSk == id select x).FirstOrDefault(); context.Remove(törlendőOktató); context.SaveChanges(); }
public Instructor Get(int id) { StudiesContext context = new StudiesContext(); var keresettOktató = (from x in context.Instructors where x.InstructorSk == id select x).FirstOrDefault(); return(keresettOktató); }
public StudentServiceImpl(StudiesContext studiesContext) { this.studiesContext = studiesContext; }
public IEnumerable <Instructor> Get() { StudiesContext context = new StudiesContext(); return(context.Instructors.ToList()); }