how to return one object from inner join Linq to Sql expression method?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


how to return one object from inner join Linq to Sql expression method?



I use inner join to get compteurs of a membre using Linq to Sql expression method, but I don't know how to return only compteurs objects from results.


public List<EntityCompteur> GetMembreCompteurs(int membreId)
{
return _entities.EntityCompteurs
.Join(
_entities.Contrat.Where(u => u.MembreId == membreId),
compteur => compteur.CompteurId,
utilisatuer => utilisatuer.CompteurId,
(compteur, utilisatuer) =>
// I want to return only compteur;
).ToList();
}





Just put in => compteur.
– NetMage
yesterday


=> compteur





Thanks, that works I did not notice that.
– Abderrazzak Benbouya
yesterday









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

How to scale/resize CVPixelBufferRef in objective C, iOS

Stripe::AuthenticationError No API key provided. Set your API key using “Stripe.api_key = ”

SVG with two text elements. When one resizes due to textLength - how to resize the other one to the same character size