public async Task <IActionResult> Create([Bind("Id,FirstName,LastName,Image")] InstructorVM instructor)
        {
            CloudStorageAccount account       = CloudStorageAccount.Parse(storageConnection.ToString());
            CloudBlobClient     serviceClient = account.CreateCloudBlobClient();

            // Create container. Name must be lower case.
            Console.WriteLine("Creating container...");
            var container = serviceClient.GetContainerReference("instructor-images");

            container.CreateIfNotExistsAsync().Wait();

            // write a blob to the container
            CloudBlockBlob blob = container.GetBlockBlobReference("helloworld.txt");

            using (var memoryStream = new MemoryStream())
            {
                await instructor.Image.CopyToAsync(memoryStream);

                await blob.UploadFromStreamAsync(memoryStream);



                if (ModelState.IsValid)
                {
                    await _instructorsService.AddInstructorAsync(new InstructorRequest
                    {
                        FirstName = instructor.FirstName,
                        LastName  = instructor.LastName
                    });

                    return(RedirectToAction(nameof(Index)));
                }
            }
            return(View(instructor));
        }
        public async Task <IActionResult> AddInstructor([FromBody] InstructorRequest request)
        {
            var response = await _instructorsService.AddInstructorAsync(request);

            if (response.IsError)
            {
                return(BadRequest(response.ErrorMessage));
            }

            return(Ok(response));
        }