public static async Task <int> CreateFundInvestorAsync(this MasterSideLetterDataAccess dataAccess, FundInvestor fundInvestor) { await dataAccess.ValidateFundInvestorAsync(fundInvestor); return(await dataAccess.ExecuteScalarAsync <int>( @" insert FundInvestor( FundId, FundSponsorName, FundBusinessUnitName, FundStrategyName, InvestorId, InvestorType, Entity, Commitment, Counsel, Notes, FundYear, FundSize ) output inserted.Id values( @FundId, @FundSponsorName, @FundBusinessUnitName, @FundStrategyName, @InvestorId, @InvestorType, @Entity, @Commitment, @Counsel, @Notes, @FundYear, @FundSize )", fundInvestor)); }
public static async Task <int> UpdateFundInvestorAsync(this MasterSideLetterDataAccess dataAccess, FundInvestor fundInvestor) { await dataAccess.ValidateFundInvestorAsync(fundInvestor); return(await dataAccess.ExecuteAsync( @" update FundInvestor set FundId = @FundId, FundSponsorName = @FundSponsorName, FundBusinessUnitName = @FundBusinessUnitName, FundStrategyName = @FundStrategyName, InvestorId = @InvestorId, InvestorType = @InvestorType, Entity = @Entity, Commitment = @Commitment, Counsel = @Counsel, Notes = @Notes, FundYear = @FundYear, FundSize = @FundSize, ModifiedDate = getdate() where Id = @id", fundInvestor)); }