/// <summary> /// add as an asynchronous operation. /// </summary> /// <param name="employee">The employee.</param> /// <param name="token">The cancellation token that can be used by other objects or threads to receive notice of cancellation.</param> public Task <EmployeeModel> AddAsync(EmployeeModel employee, CancellationToken token) { token.ThrowIfCancellationRequested(); return(Task.Run(() => _emp.Update(employee))); }