public List<EventEntity> GetCurrentUpComingEventsByEstate(string EstName)
{
EventDBModelDataContext context = new EventDBModelDataContext();
var res = from e in context.EventEntities
where e.eventDate >= DateTime.Now  _estatename(?)
select e;
return res.ToList();
}

Hi experts,
How do i declare the estatename part so that when i test the program in web browser, i will only get the details of the estatename that i choose based on the date and the estatename?

Edited 3 Years Ago by Nick Evan: Fixed formatting

If the variable "estatename" is part of "context" then:

...
where
   e.eventDate >= DateTime.Now
   && e.estatename.Equals(EstName)
...

Hi, thanks for the coding. however why when i test it on the web service, the response is endpoint not found. what could be the possible reasons ?

[OperationContract]
[WebInvoke(UriTemplate = "GetCurrentUpComingEventsByEstate?estateName=EstName",
RequestFormat = WebMessageFormat.Xml,
ResponseFormat = WebMessageFormat.Xml)]
List<EventEntity> GetCurrentUpComingEventsByEstate(string EstName);


public List<EventEntity> GetCurrentUpComingEventsByEstate(string EstName)
{
EventDBModelDataContext context = new EventDBModelDataContext();
var res = from e in context.EventEntities
where e.eventDate >= DateTime.Now
&& e.estateName.Equals(EstName)
select e;
return res.ToList();
}

This is my codes. But the endpoint is not found when i tried to run it in web browser. Can someone pls help ?

Edited 3 Years Ago by Nick Evan: Fixed formatting

Is your service turned "ON" in IIS?
Did you activate the service in the web server so it could be found?

This question has already been answered. Start a new discussion instead.