Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this._http.post<any>(this.baseUrl + 'api/Tasks/AddTask', { id: 1, title: 'dddd', description: 'vvvv' }).subscribe(
- (res) => console.log(res),
- (err) => console.log(err)
- );
- [HttpPost("[action]")]
- public JsonResult AddTask(TaskDTO task)
- {
- return Json(new { result = "ok" });
- }
- public class TaskDTO
- {
- public int id { get; set; }
- public string title { get; set; }
- public string description { get; set; }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement