public OpportunityBuyer GetOpportunityBuyerById(int buyerId) { OpportunityBuyer buyer = opportunityRepository.GetOpportunityBuyerDetailsById(buyerId); buyer.Comments = null; return(buyer); }
public OpportunityBuyer GetOpportunityBuyerDetailsById(int buyerId) { using (var db = ObjectContextFactory.Create()) { var sql = @"SELECT OpportunityID,ContactID,Potential,ExpectedToClose,Comments,Owner,StageID FROM OpportunityContactMap(nolock) where OpportunityContactMapID=@oppcontmapId"; OpportunityBuyer buyer = db.Get <OpportunityBuyer>(sql, new { oppcontmapId = buyerId }).FirstOrDefault(); return(buyer); } }