示例#1
0
        public async Task <ActionResult> Create(Snipplet snipplet)
        {
            if (snipplet.Headline != null && snipplet.Content != null)
            {
                snipplet.Tags.Add(CsTag);
                _repo.Insert(snipplet);
                await _repo.CommitAsync();

                return(RedirectToAction("Index"));
            }
            return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
        }