コード例 #1
0
        public async Task <ActionResult> Create([Bind(Include = "PictureId,Name")] Picture picture)
        {
            if (!ModelState.IsValid)
            {
                View("Error");
            }

            var response = await _clientWrapper.CreateAsync("api/picturesapi", picture);

            if (response.IsSuccessStatusCode)
            {
                return(RedirectToAction("Index"));
            }
            return(View("Error"));
        }