title: exposing method in wcf service
body: <p>so I'm finally done with caching in WCF service. Anyways, now this is my interface</p>
  
  <pre><code>[ServiceContract]
  public interface IService1
  {
      [OperationContract]
      IEnumerable&lt;Screen_Data&gt; GetData(DateTime d);
  }
  </code></pre>
  
  <p>and this is my class which implements this interface</p>
  
  <pre><code>[AspNetCompatibilityRequirements(RequirementsMode =
                         AspNetCompatibilityRequirementsMode.Allowed)]
  [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]
  public class Service1 : IService1
  {
     [AspNetCacheProfile("CacheFor2Minutes")]
     [WebGet(UriTemplate = "?DateTime={DateTime}")]
     public IEnumerable&lt;Screen_Data&gt; GetData(DateTime d)
     {
         ScreenScrapingEntities1 db = new ScreenScrapingEntities1();
         IEnumerable&lt;Screen_Data&gt; sd = from p in db.Screen_Data
                                       where p.DateTime &gt; d
                                       select p;
         return sd;
      }
  }
  </code></pre>
  
  <p>This screen_data is a database table and I have generated a ado.net Entity Data Model from the database. </p>
  
  <p>My question is when I try to call this method from a WCF client passing a datetime value, it should return more than 10 rows. I'm not sure how I can return those rows from this method, can someone help me with this code I have written in class, it doesn't even take lambda expressions in linq query.</p>
  
  <p>And this is how I'm calling this <code>GetData</code> method from the client</p>
  
  <pre><code>DateTime t = DateTime.Parse("2012-05-31 11:38:29.070");
  ServiceReference1.Service1Client client = new ServiceReference1.Service1Client();
  client.GetData(t);
  </code></pre>
  
  <p>this the class generated while creating model </p>
  
  <pre><code>[EdmEntityTypeAttribute(NamespaceName="ScreenScrapingModel", Name="Screen_Data")]
      [Serializable()]
      [DataContractAttribute(IsReference=true)]
      public partial class Screen_Data : EntityObject
      {
  }
  </code></pre>