public ActionResult AddConference(ConferenceAddViewModel model) { if (model != null) { Conference conf = new Conference { Thema = model.Thema, Date = model.Date, Direction = model.Direction, Details = model.Details, Requirements = null, Image = null }; if (model.Image != null) { conf.Image = _userService.СonvertingImg(model.Image); } if (model.Requirements != null) { conf.Requirements = _userService.СonvertingImg(model.Requirements); } _conferencService.AddCovference(conf); } return(View("Index")); }
public ActionResult CreateConference(Conference model) { if (model != null) { _conService.AddCovference(model); } return(RedirectToAction("Index", "Conference")); }