//public FacultyProcessor(IFacultyDao dao, IFacultyParamConverter paramConverter,
        //    IFacultyResultConverter resultConverter)
        //{
        //    this.Dao = dao;
        //    this.ParamConverter = paramConverter;
        //    this.ResultConverter = resultConverter;
        //}

        public FacultyResult Create(FacultyParam param)
        {
            Model.Faculty entity = ParamConverter.Convert(param, null);

            entity = Dao.Save(entity);

            return(ResultConverter.Convert(entity));
        }
        public void Update(long id, FacultyParam param)
        {
            Model.Faculty oldEntity = Dao.Find(id);

            if (oldEntity != null)
            {
                Dao.Delete(oldEntity);
                Dao.Update(ParamConverter.Convert(param, null));
            }
            else
            {
                Console.WriteLine($"No entity with Id = {id}  was found");
            }
        }
        //public FacultyService(IFacultyProcessor processor)
        //{
        //    this.Processor = processor;
        //}

        /// <summary>
        /// Function to create new a entity .
        /// </summary>
        /// <param name="param">a entity</param>
        /// <returns>response and new entity</returns>
        public ApiResponse Create(FacultyParam param)
        {
            ApiResponse response = new ApiResponse();

            try
            {
                response.Text = $"The entity successfully added .\n" +
                                $" {Serialization.Serizlize(Processor.Create(param))}";
                response.Result = true;

                return(response);
            }
            catch (Exception ex)
            {
                response.Result = false;
                response.Text   = ex.Message;

                return(response);
            }
        }
        /// <summary>
        /// Function to update information about a entity .
        /// </summary>
        /// <param name="id">entity's id</param>
        /// <param name="param">entity</param>
        /// <returns>response and update entity</returns>
        public ApiResponse Update(long id, FacultyParam param)
        {
            ApiResponse response = new ApiResponse();

            try
            {
                Processor.Update(id, param);
                response.Text   = "The entity updated successfully . \n";
                response.Result = true;

                return(response);
            }
            catch (Exception ex)
            {
                response.Result = false;
                response.Text   = ex.Message;

                return(response);
            }
        }
 /// <summary>
 ///
 /// </summary>
 /// <param name="param">a entity</param>
 public void ValidateParameters(FacultyParam param)
 {
     throw new NotImplementedException();
 }