WCF : web client and service RRS feed

  • Question

  • I am creating a WCF service with service based database that is accessible by a web client ( HTML, JS,...) . i am new with WCF i did some tutorials to create a service here is the code : 

    ------ IService.cs

        public interface IService
            void CreateUser(Info user);
            List<Info> GetUsers();
            void RemoveUser(string id);

    -------- Service.cs

        public class Service : IService
            List<Info> users = new List<Info>();
            #region IService Members
            public void CreateUser(Info user)
                user.Id = Guid.NewGuid().ToString();
            public List<Info> GetUsers()
                return users;
            public void RemoveUser(string id)
                users.Remove(users.Find(e => e.Id.Equals(id)));

    how can i link the database to this service, and is there a tutorial on how to create a simple Web client .


    Wednesday, February 8, 2012 7:11 PM


All replies