This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Data.Services; | |
namespace OData101.UpdateTheSvcFileWhenBinDeploying | |
{ | |
public class BinDeploy : DataService<DummyContext> { } | |
public class DummyContext { } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var queryString = ("/Northwind.svc/Products?" | |
+ "$filter=((Category/Category_ID eq 1)or" | |
+ "substringof('tofu',tolower" | |
+"(Product_Name)))&" | |
+ "$orderby=Category/Category_Name&" | |
+ "$select=Product_Name"); | |
$.ajax({ | |
url: queryString, | |
dataType: 'JSON', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context.Configurations.ResponsePipeline.OnEntryEnded((a => | |
{ | |
Type entityType = dataServiceContext.ResolveType(a.Entry.TypeName); | |
if (typeof(Product).IsAssignableFrom(entityType)) | |
{ | |
var properties = a.Entry.Properties as List<ODataProperty>; | |
if (properties == null) | |
{ | |
properties = new List<ODataProperty>(a.Entry.Properties); | |
} |
OlderNewer