public void CreateToDoItem(IToDoItem item) { var client = new ToDoProxyService.Service1Client(); var toDoItem = new ToDoProxyService.ToDoItem() { Name = item.Name, IsCompleted = item.IsCompleted, ToDoId = item.ToDoId, UserId = item.UserId }; client.CreateToDoItem(toDoItem); }
public List<IToDoItem> GetTodoList(int userId) { var client = new ToDoProxyService.Service1Client(); var userList = client.GetTodoList(userId); return new List<IToDoItem>(); //return userList.Select(x => new Item() //{ // IsCompleted = x.IsCompleted, // Name = x.Name, // ToDoId = x.ToDoId, // UserId = x.UserId //}).ToList(); }
public void DeleteToDoItem(int todoItemId) { var client = new ToDoProxyService.Service1Client(); client.DeleteToDoItem(todoItemId); }
public int CreateUser(string name) { var client = new ToDoProxyService.Service1Client(); var id = client.CreateUser(name); return id; }