public async Task <RoundInvestor> CreateRoundInvestor(RoundInvestorCreateModel model) { var result = await _roundInvestorService.InsertRoundInvestor(model); Response.StatusCode = (int)HttpStatusCode.Created; return(result); }
/// <summary> /// Inserts the round investor. /// </summary> /// <param name="model">The model.</param> /// <returns></returns> public async Task <RoundInvestor> InsertRoundInvestor(RoundInvestorCreateModel model) { var roundInvestor = new RoundInvestor { RoundId = model.RoundId, InvestorName = model.InvestorName, InvestedValue = model.InvestedValue, ShareAmount = model.ShareAmount, SharesHoldingPercentage = model.SharesHoldingPercentage, PhotoUrl = model.PhotoUrl }; var inserted = _roundInvestorRepository.Insert(roundInvestor).Entity; await _unitOfWork.CommitAsync(); return(inserted); }