Ejemplo n.º 1
0
        /// <summary>
        /// Sends the changes to the service -> Creates a job execution for the job
        /// </summary>
        /// <param name="entity">The job execution entity</param>
        /// <returns>A job execution</returns>
        protected override IEnumerable <AzureSqlElasticJobExecutionModel> PersistChanges(IEnumerable <AzureSqlElasticJobExecutionModel> entity)
        {
            AzureSqlElasticJobExecutionModel resp;

            if (this.Wait.IsPresent)
            {
                resp = ModelAdapter.CreateJobExecution(entity.First());
            }
            else
            {
                resp = ModelAdapter.BeginCreateJobExecution(entity.First());
            }

            return(new List <AzureSqlElasticJobExecutionModel> {
                resp
            });;
        }