public MarksDto Add_Mark(MarksDto marks)
        {
            MapperDto_Class.ConfigAutoMapper();

            if (this.IsValidmark(marks))
            {
                var NewMARK = repository.Insert(Mapper.Map <Marks>(marks));

                return(Mapper.Map <MarksDto>(NewMARK));
            }
            else
            {
                throw new ArgumentNullException("Provided information is not valid.");
            }
        }
        public Student UpdateStudent(Student Updatedstudent)
        {
            MapperDto_Class.ConfigAutoMapper();

            Student ExsistStudent = context.Students.SingleOrDefault(item => item.StudentId == Updatedstudent.StudentId);

            if (ExsistStudent != null)
            {
                ExsistStudent.Name         = Updatedstudent.Name;
                ExsistStudent.Age          = Updatedstudent.Age;
                ExsistStudent.createdby    = Updatedstudent.createdby;
                ExsistStudent.modifiedby   = Updatedstudent.modifiedby;
                ExsistStudent.modifieddate = Updatedstudent.modifieddate;

                repository.Update(Mapper.Map <Student>(Updatedstudent));
            }

            return(null);
        }