public ServiceResultModel <ApplicationType> Edit(ApplicationType applicationType)
        {
            var res = new ServiceResultModel <ApplicationType> {
                IsSuccess = false, Errors = new List <string>()
            };
            var applicationTypeFromDB = _applicationTypeRepository.FirstOrDefault(x => x.ApplicationTypeId == applicationType.ApplicationTypeId);


            if (applicationTypeFromDB != null)
            {
                //if (!IsApplicationTypeNameAvailable(applicationType.ApplicationTypeName))
                //{
                //    res.Errors.Add("The ApplicationType Name is already present");
                //    return res;
                //}


                applicationTypeFromDB.ApplicationTypeName        = applicationType.ApplicationTypeName.TrimSpace();
                applicationTypeFromDB.ApplicationTypeDescription = applicationType.ApplicationTypeDescription.TrimSpace();

                _applicationTypeRepository.Edit(applicationTypeFromDB);

                UnitOfWork.Commit();

                res.IsSuccess = true;
                res.Data      = applicationTypeFromDB;
                return(res);
            }
            else
            {
                res.Errors.Add("The ApplicationType Doesn't exist");
                return(res);
            }
        }