The example works but I don't know how to reference my form. I created a datatype called "program". The namespace is ch7.program the form has 4 string fields in it. How to I change this code to reference my form data?
-thanks in advance for any help.
using System.Linq;
using System.Web.Http;
using System.Web.Http.OData.Query;
using Composite.Data;
using Composite.Data.Types;
namespace Composite.Controllers
{
-thanks in advance for any help.
using System.Linq;
using System.Web.Http;
using System.Web.Http.OData.Query;
using Composite.Data;
using Composite.Data.Types;
namespace Composite.Controllers
{
public class PagesController : ApiController
{
[Queryable]
public IQueryable<IPage> Get(ODataQueryOptions<IPage> options)
{
using (var c = new DataConnection())
{
var querySettings = new ODataQuerySettings();
return options.ApplyTo(c.Get<IPage>(), querySettings).Cast<IPage>().ToList().AsQueryable();
}
}
}
}