Click here to Skip to main content
15,885,546 members
Articles / Web Development / ASP.NET

OData Services

Rate me:
Please Sign up or sign in to vote.
4.96/5 (93 votes)
7 Jun 2012CPOL29 min read 403.8K   7.3K   165  
How to create OData services using the WCF Data Services and use them
In this article, you will learn what OData services are, how to create them using the WCF Data Services, and how to use them.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace OData.Models.Plain
{
    public class Supplier
    {
        public int SupplierID { get; set; }
        public string Name { get; set; }
        public string Address { get; set; }
        public string Town { get; set; }
        public string County { get; set; }
        public string Country { get; set; }
        public string Email { get; set; }
        public DateTime DateCreated { get; set; }
        public bool IsArchived { get; set; }
        public string UserName { get; set; }
        public string Password { get; set; }
        public int Rating { get; set; }

    }

    public class LondonSupplier
    {
        public int ID { get; set; }
        public string Name { get; set; }
        public string Address { get; set; }
        public string Email { get; set; }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Program Manager Microsoft
Serbia Serbia
Graduated from Faculty of Electrical Engineering, Department of Computer Techniques and Informatics, University of Belgrade, Serbia.
Currently working in Microsoft as Program Manager on SQL Server product.
Member of JQuery community - created few popular plugins (four popular JQuery DataTables add-ins and loadJSON template engine).
Interests: Web and databases, Software engineering process(estimation and standardization), mobile and business intelligence platforms.

Comments and Discussions