public ActionResult Exist(FileInfoParamDto vm) { if (vm != null && !string.IsNullOrEmpty(vm.Name) && vm.Type != (int)FileInfoType.None) { var fileInfoService = this.GetService <IFileInfoService>(); bool result = fileInfoService.Exist(vm); return(Success(result)); } return(Error()); }
public virtual bool Exist(FileInfoParamDto vm) { var fileInfoRepository = this.GetRepository <IFileInfoRepository>(); return(fileInfoRepository.Exist(vm.Directory, vm.Name, vm.Type)); }