Exemplo n.º 1
0
        public ActionResult Create(FormCollection collection)
        {
            try
            {
                var    postedFile = Request.Files["Archetype"];
                string archetype;
                using (var textReader = new StreamReader(postedFile.InputStream))
                {
                    archetype = textReader.ReadToEnd();
                }

                _archetypeService.Save(archetype);

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }