Question Develop a Linq query

ammar.dev

Member
Joined
Sep 21, 2015
Messages
8
Programming Experience
Beginner
Hello,
I have a database in Access with this architecture:
143603225_253739806118612_2438314374903377564_n.png


and I need with Linq to calculate and return the total price of a candidate’s training knowing that only the candidate who has attended at least 5 trainings gets a 20% discount.

how to get this result with linq?
 
It would also be nice to see what you have tried and show us where you are stuck?

Can you also explain why it needs to use Linq?

Can you show how you wrote your select statement?
 
I don't think that what you're asking for is possible. I'm not aware of the existence of a LINQ provider for Access. LINQ to SQL is a dedicated SQL Server provider. LINQ to Entities is the provider for Entity Framework and EF support exists for various databases but I'm not aware that Access is one of them. LINQ to DataSet can be used if you have already retrieved the data from the database into a DataTable but that is information that you should have provided. Likewise, LINQ to Objects can be used if you have already retrieved the data into a collection of objects of a dedicated type.

So, why do you think you NEED to do this with LINQ and why do you think it should be possible with an Access database?
 

Latest posts

Back
Top Bottom