public async Task <Model.Todo> CreateAsync(Model.Todo todo) { _context.Todos.Add(todo); await _context.SaveChangesAsync(); return(todo); }
public static TodoOutputContract ToTodoOutputContract(this Model.Todo source) { return(new TodoOutputContract() { Id = source.Id, Description = source.Description, Title = source.Summary }); }
public async Task <bool> Post(Model.Todo todo) { var result = await client().CreateTodoAsync(new TodoReturn { Category = todo.Category, Content = todo.Content, Title = todo.Title }); return(result.Bool); }
public async Task <Model.Todo> GetSingleTodo(string name) { var result = await client().SingleTodoAsync(new GetTodoName { Name = name }); var todo = new Model.Todo { Category = result.Category, Content = result.Content, Title = result.Title }; return(todo); }