public void UpdateTask(tbl_task newTaskDetails) { using (dbContext = new ProjectManagerConnection()) { dbContext.Entry(newTaskDetails).State = EntityState.Modified; dbContext.SaveChanges(); } }
public void CreateTask(tbl_task newTaskDetails) { using (dbContext = new ProjectManagerConnection()) { dbContext.tbl_task.Add(newTaskDetails); dbContext.SaveChanges(); } }