Hi,
may i know how to write the method in web service if i want to get a description from a particular id ?
public List<EventEntity> GetDetails(string uid)
{
EventDBModelDataContext ct = new EventDBModelDataContext();
var detail = ct.EventEntities.Where(d => d.eventID==uid).Select(d => new { d.eventID, d.eventDesc });
return detail.ToList();
}
Still having the error message: Cannot implicitly convert type 'System.Collections.Generic.List<AnonymousType#1>' to 'System.Collections.Generic.List<WcfEstateService2.EventEntity>' I:\vs\WcfEstateService2\WcfEstateService2\ServiceImpl.svc.cs