public void Add(Student student) { int lastId = LastIdentity(GetAll()); student.Identity = lastId; LastId = lastId; studentDal.Add(student); }
public IResult Add(Student student) { try { _IStudentDal.Add(student); return(new SuccessResult(message: Contants.Messages.AddMessage)); } catch (Exception ex) { return(new ErrorResult(message: ex.Message)); } }
public void Add(StudentDto studentDto) { // ValidationAspect.FluentValidate(new StudentValidatior(), studentDto); var student = new Student() { Name = studentDto.Name, Surname = studentDto.Surname, }; _studentDal.Add(student); _studentDal.Save(); }
public void Add(Student entity) { if (Validation(entity)) { return; } if (_studentDal.Get(p => p.Tc.Equals(entity.Tc)) != null) { return; } try { _studentDal.Add(entity); Message.Info("Öğrenci Eklendi!"); } catch { Message.Error("Öğrenci Eklenemedi!"); } }
public IResult Add(Student student) { var entity = new Student() { Name = student.Name, Surname = student.Surname, StudentNumber = student.StudentNumber, Grades = student.Grades }; _studentDal.Add(entity); return(new SuccessResult()); }
public IResult Add(Student student) { student.Fee = 0; student.FeePaid = 0; try { _studentDal.Add(student); } catch (Exception) { return(new Result(false, "Student cannot be added")); } return(new Result(true, "Student added")); }
public IActionResult Create(Student student) { var file = Request.Form.Files[0]; student.PhotoPath = UploadPhoto(file); if (ModelState.IsValid) { _studentDal.Add(student); _redisDatabase.KeyDelete("studentList"); return(RedirectToAction(nameof(Index))); } ViewData["DepartmentId"] = new SelectList(_departmentDal.GetList(), "Id", "Name", student.DepartmentId); return(View(student)); }
public Student Add(Student entity) { return(_studentDal.Add(entity)); }
public void Add(Student student) { _studentDal.Add(student); }
public void Add(Student student) { ValidationTool.Validate(new StudentValidator(), student); _studentDal.Add(student); }
public IResult Add(Student student) { _studentDal.Add(student); return(new SuccessResult(Messages.StudentAdded)); }
public void Add(IStudentDal iStudentDal) { iStudentDal.Add(); }
public Student AddStudent(Student student) { return(_studentdal.Add(student)); }
public Student Add(Student student) { return(_studentDal.Add(student)); }