public void Delete(int id) { var entity = _studentDal.Get(p => p.Id == id); _studentDal.Delete(entity); _studentDal.Save(); }
public IActionResult Details(int id) { var student = _studentDal.Get(id); return(View(student)); }
public IResult Delete(int studentId) { var result = _studentDal.Get(f => f.Id == studentId); if (result != null) { _studentDal.Delete(result); return(new SuccessResult(Messages.StudentDeleted)); } return(new ErrorResult(Messages.DoesntExist)); }
public IDataResult <Student> GetById(int id) { if (_studentDal.Get(s => s.Id == id) != null) { var result = _studentDal.Get(s => s.Id == id); return(new SuccessDataResult <Student>(result)); } else { return(new ErrorDataResult <Student>()); } }
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 Student Find(Expression <Func <Student, bool> > filter) { var data = _mapper.Map <Student>(_studentDal.Get(filter)); return(data); }
public IDataResult <Student> Get(int studentId) { return(new SuccessDataResult <Student>(_IStudentDal.Get(filter: x => x.StudentId == studentId))); }
public Student GetById(int userId) { return(_studentDal.Get(filter: student => student.UserId == userId)); }
public Student Get(Expression <Func <Student, bool> > filter) { return(_studentDal.Get(filter)); }
public IDataResult <Student> GetById(int userId) { return(new SuccessDataResult <Student>(_studentDal.Get(filter: student => student.UserId == userId))); }
public Student GetById(int studentId) { return(_studentDal.Get(x => x.Id == studentId)); }
public Student GetById(int id) { return(_studentDal.Get(s => s.StudentId == id)); }
public Students Get(int id) { return(studentDal.Get(id)); }
public Student GetById(int schoolNo) { return(_studentDal.Get(x => x.SchoolNo == schoolNo)); }
public Student GetStudentByID(Student student) { return(_studentDal.Get(x => x.StudentID.Equals(student.StudentID))); }