public class IntertechWS : System.Web.Services.WebService
{
[WebMethod]
public SerializableEntity<Page> GetPage(int id)
{
PageController ctrl = new PageController();
Page page = ctrl.GetPage(id);
SerializableEntity<Page> entity = new SerializableEntity<Page>(page);
return entity;
//IntertechDBDataContext db = new IntertechDBDataContext();
//var page = db.Pages.SingleOrDefault<Page, SerializableEntity<Page>>(p => p.PageID == id);
//return page;
}
[WebMethod]
public List<SerializableEntity<Page>> GetSubPages(int id, int langId)
{
PageController ctrl = new PageController();
return ctrl.GetSubPages(id, langId).ToList<Page, SerializableEntity<Page>>();
//IntertechDBDataContext db = new IntertechDBDataContext();
//var pages = db.Pages.ToList<Page, SerializableEntity<Page>>();
//return pages;
}
}
web service - linq to sql & web service
Gönderen
pantepember
5 Kasım 2009 Perşembe
Etiketler: linq to sql , web service