Esempio n. 1
0
        public async Task <ProposalResponse> UnassignProposalAsync(int employerId, int freelancerId)
        {
            try
            {
                Proposal proposal = await _proposalRepository.FindByEmployerIdAndFreelancerId(employerId, freelancerId);

                _proposalRepository.UnassignProposal(employerId, freelancerId);
                await _unitOfWork.CompleteAsync();

                return(new ProposalResponse(proposal));
            }
            catch (Exception ex)
            {
                return(new ProposalResponse($"An error ocurred while unassigning Freelancer to Employer: {ex.Message}"));
            }
        }