Esempio n. 1
0
        public async Task <ActionResult> Create(IFormCollection collection)
        {
            string ign   = Convert.ToString(collection["InGameName"]);
            string name  = Convert.ToString(collection["CharacterName"]);
            string type  = Convert.ToString(collection["Type"]);
            string clas  = Convert.ToString(collection["Class"]);
            Double dps   = Convert.ToDouble(collection["DPS"]);
            string parse = Convert.ToString(collection["Parse"]);

            try
            {
                var newDamage = new Damage(ign, name, dps, type, clas, parse);
                await FS.AddNewDD(newDamage);

                return(RedirectToAction(nameof(Index)));
            }
            catch (Exception e)
            {
                var y = e;
                return(View());
            }
        }