public async Task <ActionResult <Work> > AssignTask([FromBody] Work task) //we are expecting http request and inside of request we expect product body and .net core will auto convert jason to object
        {
            await _repository.Create(task);

            return(CreatedAtRoute("GetTask", new { id = task.Id }, task));
        }
示例#2
0
 public bool Create(WorkModel model)
 {
     return(_res.Create(model));
 }