Ejemplo n.º 1
0
        public async Task <ActionResult <AzureTask> > CreateTasks(string name)
        {
            try
            {
                var task = new AzureTask(name);
                this.unitOfWork.Tasks.Add(task);
                await this.unitOfWork.Save();

                await QueueServices.SendTask(task);

                return(this.Ok(task));
            }
            catch (Exception ex)
            {
                return(this.StatusCode(500, ex.Message));
            }
        }