示例#1
0
        public Taskul Create(TaskPostModel taskPost)
        {
            Taskul toAdd = TaskPostModel.ToTaskul(taskPost);

            context.Taskuri.Add(toAdd);
            context.SaveChanges();
            return(toAdd);
        }
 public void Post([FromBody] Taskul task)
 {
     if (ModelState.IsValid)
     {
         context.Taskuri.Add(task);
         context.SaveChanges();
     }
 }