public async Task <IActionResult> AddDepartment([FromBody] Department department) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } await _context.AddAsync(department); await _context.SaveChangesAsync(); return(Ok(department.ID)); }
public int AdderAsync(TeacherStudent ob) { db.AddAsync(ob); return(1); }