public IActionResult Create() { YearlyEventsViewModel yearlyeventsViewModel = new YearlyEventsViewModel(); return(View(yearlyeventsViewModel)); }
public async Task <IActionResult> Create([Bind("Id,SpecialEvents,Months," + "Parshios,StartTime,EndTime")] YearlyEventsViewModel yearlyEvents) { if (ModelState.IsValid) { _context.Add(yearlyEvents); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View("YearlyEvents/Create")); }