// GET api/<controller> public IEnumerable <Task> Get() { TaskRepositorySqlServer trep = new TaskRepositorySqlServer(); var tasks = trep.Tasks(); return(tasks); }
/// <summary> /// Persist the new task in the repository /// </summary> public void Save() { // create new object and send to server TaskDTO td = new TaskDTO(); td.Name = this.Name; td.Description = this.Description; td.Status = this.Status; ITaskRepository taskRepository = new TaskRepositorySqlServer(); taskRepository.Add(td); }