Format:
Recent snippets matching tags of OData
void DoQuery() { // Register for the LoadCompleted event. var _Data = new DataServiceCollection<CityCrime>(); _Data.LoadCompleted += _Data_LoadCompleted; // start the servery query var _Query = GetContext().CityCrime .Where(x => x.State == "Colorado") .Where(x => x.City == "Denver");
70 Views
no comments
// https://datamarket.azure.com/ private const string AZUREDATAACCOUNT = "Your Customer ID"; private const string AZUREDATAKEY = "Your Account Key"; private const string AZUREDATAURL = "https://api.datamarket.azure.com/Data.ashx/data.gov/Crimes/"; // create a new context to the odata feed private static Mango.Sample.AzureMarket .CityCrimeService.datagovCrimesContainer GetContext() {
55 Views
no comments
public static class ODataMuscleExtensions { public static DataServiceQuery<T> Expand<T, TProperty>(this DataServiceQuery<T> entities, Expression<Func<T, TProperty>> propertyExpressions) { string propertyName = ExpandPropertyName(propertyExpressions); return entities.Expand(propertyName); } public static string Expand<T, TProperty>(this DataServiceCollection<T> collection, Expression<Func<T, TProperty>> propertyExpressions) {
211 Views
no comments
public static class ServiceQueryExtension { public static DataServiceQuery<T> Expand<T, TProperty>( this DataServiceQuery<T> entities, Expression<Func<T, TProperty>> propertyExpressions) { string propertyName = propertyExpressions.GetMemberName(); return entities.Expand(propertyName); }
127 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
