» New pastecode


» Posted by noname at 12/11/2005 22:42:33


» ID: http://www.wilcob.com/Wilco/Pastecode/2183/showpaste.aspx


» Language: C#


« Previous - Next »
1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 

using System;
using System.ComponentModel;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;


/// <summary>
/// Summary description for ApartmentService
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class ApartmentService : Microsoft.Web.Services.DataService {
    [DataObjectMethod(DataObjectMethodType.Select)]
    public Apartment[] GetApartments() {
        return new Apartment[] {
            new Apartment("1", 47.25, -122, "Apartment 1"),
            new Apartment("2", 47.6, -122.8, "Apartment 2"),
            new Apartment("3", 47.5, -122.6, "Apartment 3")
        };
    }
}