Exemple #1
0
 public ActionResult Create(AppSettingViewModel model, int type)
 {
     if (ModelState.IsValid)
     {
         var user = new AppSetting
         {
             TypeId        = model.TypeId,
             AboutUs       = model.AboutUs,
             CafebazarLink = model.CafebazarLink,
             ChangeLog     = model.ChangeLog,
             Instagram     = model.Instagram,
             Site          = model.Site,
             Soundcloud    = model.Soundcloud,
             Telegram      = model.Telegram
         };
         _appSettingService.AddNewAppSetting(user);
         return(RedirectToAction(nameof(Index), new { type = user.TypeId }));
     }
     return(View(model));
 }