コード例 #1
0
ファイル: Language.cs プロジェクト: nguyen-manh-cuong/spa
 public Language(LanguageInputViewModel obj)
 {
     Key  = obj.Key;
     Page = obj.Page;
     Vi   = obj.Vi;
     En   = obj.En;
 }
コード例 #2
0
        public async Task <IActionResult> Index(LanguageInputViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(this.View(model));
            }

            int id = default(int);

            try
            {
                id = await this.languageService.SaveFormData(model, this.userName);
            }
            catch (Exception e)
            {
                this.logger.LogDebug(e, $"An exception happened for user {userName}");
                return(this.BadRequest());
            }

            return(this.Redirect(Url.RouteUrl(new { controller = "Resume", action = "Display" }) + $"#{id}"));
        }