title: Delete a sql row using Linq in C#
body: <p>I am trying to delete a sql table record from C# thru Linq but some reason DeleteonSubmit is not recoganized,am not sure what iam missing here, please guide me the right way</p>
  
  <p>here is my code</p>
  
  <pre><code>          proxy = new ServiceClient("basicHttp_IService");
          //GatewayService.ServiceClient proxy = new ServiceClient("basicHttp_IService");
  
          SearchCriteria criteria = new SearchCriteria();
          criteria.UserRoles = new string[] { "*" };
  
          var stories = proxy.GetStoryItemsByCriteria(criteria);
          var programs = proxy.GetPrograms();
          var Profiles = proxy.GetProfiles();
  foreach(StoryProgram sp in lstStoriestoClose)
  {
      try
      {
          DateTime LastUpdateTimestamp;
          DateTime CurrentTime = DateTime.Now;
          LastUpdateTimestamp = sp.Story.LastUpdatedOn;
  
          if ((CurrentTime - LastUpdateTimestamp).TotalHours &gt; 24)
          {
              //Delete the story from database
              var storytoDelete = from story in stories
                                  where story.Id == sp.Story.Id
                                  select story;
  
              //I am trying to delete the record like below
              stories.DeleteonSubmit(storytoDelete);
              stories.SubmitChanges();
              //Intellisense doesn't show the option DeleteonSubmit and SubmitChanges
          }
      }
  }
  </code></pre>
  
  <p>Please guide me the right way to delete the record in SQL thru Linq</p>