public ActionResult Create() { FeedEditViewModel model = new FeedEditViewModel(); model.InitializerDefaulValues(); return(View(model)); }
public ActionResult Create(FeedEditViewModel model, string action = nameof(ExperienceForSubmit.Save)) { var entity = model.MapFrom(); if (ModelState.IsValid) { entity = FeedChannelService.Add(entity); if (entity != null && entity.Id > 0) { TempData["SuccessSave"] = "Канал успешно добавлен"; } } return(RedirectToAction("Index")); }