using System; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; using System.ServiceModel.Activation; using System.Collections.Generic; using System.Text; namespace SilverlightApplication1.Web { [ServiceContract(Namespace = "")] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] public class Service1 { [OperationContract] public void DoWork() { // Add your operation implementation here return; } // Add more operations here and mark them with [OperationContract] [OperationContract] public List kysiKoerad(string eesnimi) { DataClasses1DataContext db = new DataClasses1DataContext(); var k = from koer in db.koerads where koer.koeranimi.Equals(eesnimi) select koer; return k.ToList(); } } }