Looking to convert some .asmx webservices to REST. I am not interested in WCF style, rather a more simple way if that makes sense. All my operations will be CRUD. I have read about REST and HTTPWebRequest and HttpWebResponseDoes anyone know the simpleset way to do this? My asmx code is below.. A quick REST service of this would be appreciated if anyone can help. Thank You!
[WebMethod]
public Products[] GetProducts()
{
ProductDA dataAccess = new ProductDA();
List<Product> obj = new List<Product>();
obj = dataAccess.GetProducts();
return obj.ToArray();
}
Have you checked out the new ASP.NET WebAPI? Sounds like it would be a good choice if you’re able to target .NET 4 as a platform. You should be able to use your existing service implementation with virtually no changes.