public ResponseData <int> SaveStudentUser(SaveStudentUser saveStudentUser)
        {
            ResponseData <int> response = new ResponseData <int>();

            StudentUserFacade facade = new StudentUserFacade();

            try
            {
                response.Data = facade.Save(saveStudentUser);
            }
            catch (Exception ex)
            {
                ExceptionHandlerFactory.Factory.GetResponseExceptionHandler(response).Handle(ex);
            }

            return(response);
        }
        public ResponseData <List <StudentUser> > GetStudentUsers()
        {
            ResponseData <List <StudentUser> > response = new ResponseData <List <StudentUser> >();

            StudentUserFacade facade = new StudentUserFacade();

            try
            {
                response.Data = facade.GetAll();
            }
            catch (Exception ex)
            {
                ExceptionHandlerFactory.Factory.GetResponseExceptionHandler(response).Handle(ex);
            }

            return(response);
        }
        public ResponseData <object> DeleteStudentUser(DeleteStudentUser deleteStudentUser)
        {
            ResponseData <object> response = new ResponseData <object>();


            StudentUserFacade facade = new StudentUserFacade();

            try
            {
                facade.Delete(deleteStudentUser);
            }
            catch (Exception ex)
            {
                ExceptionHandlerFactory.Factory.GetResponseExceptionHandler(response).Handle(ex);
            }

            return(response);
        }
        public ResponseData <StudentUser> GetStudentUserById(string id)
        {
            ResponseData <StudentUser> response = new ResponseData <StudentUser>();

            int currId = 0;

            int.TryParse(id, out currId);

            if (currId != 0)
            {
                StudentUserFacade facade = new StudentUserFacade();
                try
                {
                    response.Data = facade.GetById(new Guid(id));
                }
                catch (Exception ex)
                {
                    ExceptionHandlerFactory.Factory.GetResponseExceptionHandler(response).Handle(ex);
                }
            }

            return(response);
        }