public async Task <IActionResult> Put(int id, [FromBody] ParentTaskDetails parentTask) { if (!ModelState.IsValid || parentTask == null || id != parentTask.ParentId) { return(BadRequest("Provided Parent Task Details are not valid.")); } await _manageParentTaskDetails.Edit(parentTask); return(Ok(parentTask.ParentId)); }
public async Task <int> Delete(ParentTaskDetails parentTaskDetails) { return(await _parentTaskDetails.Delete(parentTaskDetails)); }
public async Task <int> Edit(ParentTaskDetails parentTaskDetails) { return(await _parentTaskDetails.Edit(parentTaskDetails)); }
public async Task <int> Insert(ParentTaskDetails parentTaskDetails) { return(await _parentTaskDetails.Insert(parentTaskDetails)); }
public Task <int> Delete(ParentTaskDetails parentTaskDetails) { throw new System.NotImplementedException(); }
public async Task <int> Insert(ParentTaskDetails parentTaskDetails) { _dbContext.ParentTask.Add(parentTaskDetails); return(await _dbContext.SaveChangesAsync()); }