Example #1
0
 public IActionResult Create(Baner baner)
 {
     if (ModelState.IsValid)
     {
         _context.Baners.Add(baner);
         _context.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(baner));
 }
Example #2
0
 public IActionResult Create(Data.Models.Collection service)
 {
     if (ModelState.IsValid)
     {
         _context.Collections.Add(service);
         _context.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(service));
 }
Example #3
0
 public IActionResult Create(Business business)
 {
     if (ModelState.IsValid)
     {
         _context.Businesses.Add(business);
         _context.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(business));
 }
Example #4
0
 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));
 }