public IActionResult Create(Baner baner) { if (ModelState.IsValid) { _context.Baners.Add(baner); _context.SaveChanges(); return(RedirectToAction("Index")); } return(View(baner)); }
public IActionResult Create(Data.Models.Collection service) { if (ModelState.IsValid) { _context.Collections.Add(service); _context.SaveChanges(); return(RedirectToAction("Index")); } return(View(service)); }
public IActionResult Create(Business business) { if (ModelState.IsValid) { _context.Businesses.Add(business); _context.SaveChanges(); return(RedirectToAction("Index")); } return(View(business)); }
public IActionResult Create(BusinessItem businessItem) { if (ModelState.IsValid) { _context.BusinessItems.Add(businessItem); _context.SaveChanges(); return(RedirectToAction("Index")); } ViewData["BusinessId"] = new SelectList(_context.Businesses, "Id", "Business", businessItem.BusinessId); return(View(businessItem)); }