Esempio n. 1
0
        public void Delete(int id)
        {
            var entity = _studentDal.Get(p => p.Id == id);

            _studentDal.Delete(entity);
            _studentDal.Save();
        }
Esempio n. 2
0
        public IActionResult Details(int id)
        {
            var student = _studentDal.Get(id);


            return(View(student));
        }
Esempio n. 3
0
        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!");
            }
        }
Esempio n. 6
0
        public Student Find(Expression <Func <Student, bool> > filter)
        {
            var data = _mapper.Map <Student>(_studentDal.Get(filter));

            return(data);
        }
Esempio n. 7
0
 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)));
 }
Esempio n. 11
0
 public Student GetById(int studentId)
 {
     return(_studentDal.Get(x => x.Id == studentId));
 }
Esempio n. 12
0
 public Student GetById(int id)
 {
     return(_studentDal.Get(s => s.StudentId == id));
 }
 public Students Get(int id)
 {
     return(studentDal.Get(id));
 }
Esempio n. 14
0
 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)));
 }