示例#1
0
        public async Task <ActionResult> Edit(Feed feed)
        {
            if (!ModelState.IsValid)
            {
                return(View("Edit", feed));
            }

            if (string.IsNullOrEmpty(feed.Id))
            {
                await _feed.Create(feed);
            }
            else
            {
                await _feed.Update(feed);
            }

            return(Redirect("/feeds"));
        }