namespace Senthamil.Sample
{
public class PORSS : DataService<ModelEntities>
{
// This method is called only once to initialize service-wide policies.
public static void InitializeService(DataServiceConfiguration config)
{
// TODO: set rules to indicate which entity sets and service operations are visible, updatable, etc.
// Examples:
config.SetEntitySetAccessRule(“RSS_STATUS”, EntitySetRights.AllRead);
config.SetServiceOperationAccessRule(“MyFunction”, ServiceOperationRights.All);
config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;
}
[WebGet]
public IQueryable<RSS_STATUS> MyFunction(string RefNumb)
{
ModelEntities MySource = new ModelEntities();
return from c in MySource.RSS_STATUS
where c.SUB_SYSTEM_NUMBER == RefNumb
select c;
}
}
}