CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of OData
C#
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");
by Jerry Nixon   November 07, 2011 @ 3:56pm
70 Views
no comments
 
C#
// 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()
{
by Jerry Nixon   November 07, 2011 @ 3:28pm
55 Views
no comments
 
C#
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)
        {
by Kenny Nguyen   October 19, 2010 @ 8:45am
211 Views
no comments
 
C#
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);
    }
by Kenny Nguyen   October 18, 2010 @ 3:42pm
Tags: OData
127 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate