Esempio n. 1
0
        public IActionResult PostTeachers(int id, string name)
        {
            var teacher = new Teachers()
            {
                te_id   = id,
                te_name = name
            };

            _context.Add(teacher);
            _context.SaveChanges();
            return(Ok("Created"));
        }
Esempio n. 2
0
 public void Create(Teacher teacher)
 {
     _context.Add(teacher);
     _context.SaveChanges();
 }