I am a bit new to C#. I am trying to retrieve a C# query and have some problems how to get my parameters i.e. id, location, name....
The result of query is in jobs and I want to retrieve jobs object to get all my data.
This is the code I have tried:
public .. searchRelevantJob(string skills, string location, string category)
{
Database1Entities o = new Database1Entities();
JobPost j = new JobPost();
using (Database1Entities context = new Database1Entities())
{
// Query for all blogs with names starting with B
var jobs = from b in context.JobPosts
where b.Locationn.Equals(location) &&
b.RequiredSkills.Equals(skills) &&
b.Department.Equals(category)
select b;
return jobs;
}
}