Exemplo n.º 1
0
 public ToDo(int id, string name, int priority, TypeToDo typeToDo)
 {
     this.id       = id;
     this.name     = name;
     this.priority = priority;
     this.TypeToDo = typeToDo;
 }
 public ActionResult Post([FromBody] TypeToDo obj)
 {
     repository.Create(obj);
     return(Ok(new {
         codigo = 200,
         mensagem = "Foi cadastrado com sucesso",
         data = obj
     }));
 }
Exemplo n.º 3
0
 public ToDo(int id, string name, int priority, int description, int age, TypeToDo typeToDo)
 {
     this.id          = id;
     this.name        = name;
     this.priority    = priority;
     this.description = description;
     this.age         = age;
     this.TypeToDo    = typeToDo;
 }
Exemplo n.º 4
0
        public ActionResult Post([FromBody] TypeToDo typeTodo)
        {
            repository.Create(typeTodo);

            return(Ok(new {
                codigo = "200",
                data = typeTodo
            }));
        }
 public void Update(TypeToDo typeToDo)
 {
     throw new System.NotImplementedException();
 }
 public void Create(TypeToDo type)
 {
     context.TypeTodos.Add(type);
     context.SaveChanges();
 }