MyService.BeginJob C# (CSharp) Method

BeginJob() private method

private BeginJob ( ) : int
return int
        public int BeginJob()
        {
            int id = GetJobID();
            // Save to a database or persistent data source
            SaveJobStatus(id, JobStatus.Running);
            ThreadPool.QueueUserWorkItem(s =>
            {
                // Do the work here
                SaveJobStatus(id, JobStatus.Completed);
            }
            return id;
        }
        [WebMethod]