public IHttpActionResult POST([FromBody] Task task) { TaskBAL tskBL = new TaskBAL(); tskBL.Add(task); return(Ok("Task created successfully")); }
static void Main(string[] args) { TaskBAL tskBL = new TaskBAL(); tskBL.Add(new TaskManager.Entities.Task() { TaskId = 1234, TaskName = "first task", Priority = 1, SDate = DateTime.Now, EDate = DateTime.Now }); }