public void DeleteUser(int id) { using (UserServiceReference.ServiceClient client = new UserServiceReference.ServiceClient()) { client.DeleteUser(id); } }
public UserServiceReference.UserRequest GetUser(int id) { using (UserServiceReference.ServiceClient client = new UserServiceReference.ServiceClient()) { return client.GetUserById(new UserServiceReference.GetUserById() { inputUserId = id}); } }
public List <UserServiceReference.UserRequest> GetUsers() { using (UserServiceReference.ServiceClient client = new UserServiceReference.ServiceClient()) { var users = client.GetAllUsers(); return(users.ToList()); } }
public int PostUser(UserServiceReference.UserRequest user) { using (UserServiceReference.ServiceClient client = new UserServiceReference.ServiceClient()) { int createdId = (int) client.CreateUser(new UserServiceReference.CreateUser() { inputUserRequest = user }); return createdId; } }
public List<UserServiceReference.UserRequest> GetUsers() { using (UserServiceReference.ServiceClient client = new UserServiceReference.ServiceClient()) { var users = client.GetAllUsers(); return users.ToList(); } }
public UserServiceReference.UserRequest GetUser(int id) { using (UserServiceReference.ServiceClient client = new UserServiceReference.ServiceClient()) { return(client.GetUserById(new UserServiceReference.GetUserById() { inputUserId = id })); } }
public int PostUser(UserServiceReference.UserRequest user) { using (UserServiceReference.ServiceClient client = new UserServiceReference.ServiceClient()) { int createdId = (int)client.CreateUser(new UserServiceReference.CreateUser() { inputUserRequest = user }); return(createdId); } }