Esempio n. 1
0
        public async Task <ActionResult> Create(IFormCollection collection)
        {
            string   ign          = Convert.ToString(collection["InGameName"]);
            string   rank         = Convert.ToString(collection["Guild_Rank"]);
            string   discord_id   = Convert.ToString(collection["Discord_ID"]);
            string   discord_name = Convert.ToString(collection["Discord_Name"]);
            DateTime date         = Convert.ToDateTime(collection["JoinDate"]);

            try
            {
                var y = new GuildMember(ign, rank, discord_id, discord_name, date);
                var x = new GuildMemberDTO(y);
                await FS.AddNewGuildMember(x);

                return(RedirectToAction("GuildMember", "Index"));
            }
            catch (Exception e)
            {
                var y = e;
                return(View());
            }
        }