예제 #1
0
        public async Task <ActionResult> EditAsync(WebsiteProperties item)
        {
            if (ModelState.IsValid)
            {
                await DocumentDBRepository <WebsiteProperties> .UpdateItemAsync(item.Id, item);

                return(RedirectToAction("Index"));
            }

            return(View(item));
        }
예제 #2
0
        public async Task <ActionResult> DeleteAsync(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            WebsiteProperties item = await DocumentDBRepository <WebsiteProperties> .GetItemAsync(id);

            if (item == null)
            {
                return(HttpNotFound());
            }

            return(View(item));
        }
예제 #3
0
        public async Task <ActionResult> DetailsAsync(string id)
        {
            WebsiteProperties item = await DocumentDBRepository <WebsiteProperties> .GetItemAsync(id);

            return(View(item));
        }