public async Task <ActionResult> CreateAsync([Bind("id,cmail,cDepartment,cCategory,cSeverity,cDescription,cblobpath,CwdDescription,completed,ByWhom")] TicketHistory item)
        {
            if (ModelState.IsValid)
            {
                await DocumentDBRespository <TicketHistory> .CreateItemAsync(item);

                return(RedirectToAction("Index"));
            }
            return(View());
        }
        public async Task <ActionResult> CreateAsync([Bind("drugname,description,price,stock")] Drugs drug, IFormFile file)
        {
            int count = 0;

            if (ModelState.IsValid)
            {
                var imageUrl = UploadBlob(file);
                drug.imageURL = imageUrl.ToString();
                var items = await DocumentDBRespository <Drugs> .GetItemsAsync();

                foreach (var item in items)
                {
                    count++;
                }
                int    convert   = count + 1;
                string convertid = convert.ToString();
                drug.Id = convertid;
                await DocumentDBRespository <Drugs> .CreateItemAsync(drug);

                return(RedirectToAction("Index"));
            }
            return(View(drug));
        }