public OperationResult Edit(EditBasicInfo command) { var operation = new OperationResult(); var basicInfo = _basicInfoRepository.Get(command.Id); if (basicInfo == null) { return(operation.Failed(ApplicationMessages.RecordNotFound)); } var persianResume = _fileUploader.Upload(command.PersianResume, "PersianResume"); var englishResume = _fileUploader.Upload(command.EnglishResume, "EnglishResume"); var recommendationLetter = _fileUploader.Upload(command.RecommendationLetters, "RecommendationLetters"); basicInfo.Edit(command.Name, command.Family, command.Age, command.Nationality, command.Job, command.Address, command.Email, command.Mobile, command.Instagram, command.Language, command.Experience, command.CompleteProject, command.HappyCustomers, command.Articles, persianResume, englishResume, recommendationLetter); _basicInfoRepository.SaveChanges(); return(operation.Succedded()); }
public JsonResult OnPostEdit(EditBasicInfo command) { var result = _basicInfoApplication.Edit(command); return(new JsonResult(result)); }