示例#1
0
        public void InsertStudent(StudentInputInsert model)
        {
            var userName = GetUserNameToTokenJWT();
            var userId   = _userManager.Users.Where(x => x.UserName.ToLower().Equals(userName.ToLower())).Select(x => x.UserId).FirstOrDefault();

            _studentcontext.InsertStudent(model, userId);
        }
示例#2
0
        public void InsertStudent(StudentInputInsert model, int userId)
        {
            var student = new Student();

            student.Name        = model.Name;
            student.gender      = model.gender;
            student.DateOfBirth = model.DateOfBirth;
            student.address     = model.address;
            student.IsDelete    = model.IsDelete;


            _context.Student.Add(student);
            _context.SaveChanges();
        }
示例#3
0
 public void Insert([FromBody] StudentInputInsert model)
 {
     _StudentService.Insert(model);
 }