public async Task <IActionResult> Create([Bind("id,name")] Developer developer) { if (ModelState.IsValid) { _context.Add(developer); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(developer)); }
public async Task <IActionResult> Create([Bind("id,name,mail,password,shoppingCartId")] User user) { if (ModelState.IsValid) { _context.Add(user); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(user)); }
public async Task <IActionResult> Create([Bind("FlowerID,FlowerName")] Flower flower) { if (ModelState.IsValid) { _context.Add(flower); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(flower)); }
public async Task <IActionResult> Create([Bind("CustomerID,LastName,FirstMidName,RegistrationDate")] Customer customer) { if (ModelState.IsValid) { _context.Add(customer); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(customer)); }
public async Task <IActionResult> Create([Bind("Id,Name")] Region Region) { if (ModelState.IsValid) { Region.Active = 1; _context.Add(Region); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(Region)); }
public async Task <IActionResult> Create([Bind("id,userId")] ShoppingCart shoppingCart) { if (ModelState.IsValid) { _context.Add(shoppingCart); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["userId"] = new SelectList(_context.User, "id", "id", shoppingCart.userId); return(View(shoppingCart)); }
public async Task <IActionResult> Create([Bind("id,text,score,gameId")] Review review) { if (ModelState.IsValid) { _context.Add(review); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["gameId"] = new SelectList(_context.Games, "id", "id", review.gameId); return(View(review)); }
public async Task <IActionResult> Create([Bind("OrderID,CustomerID,FlowerID")] Order order) { if (ModelState.IsValid) { _context.Add(order); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewData["CustomerID"] = new SelectList(_context.Customers, "CustomerID", "CustomerID", order.CustomerID); ViewData["FlowerID"] = new SelectList(_context.Flowers, "FlowerID", "FlowerID", order.FlowerID); return(View(order)); }
public async Task <IActionResult> Create([Bind("id,name,description,imageUrl,price,developerId,publisherId")] Game game) { if (ModelState.IsValid) { _context.Add(game); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["developerId"] = new SelectList(_context.Developer, "id", "id", game.developerId); ViewData["publisherId"] = new SelectList(_context.Publisher, "id", "id", game.publisherId); return(View(game)); }
public async Task <IActionResult> Create([Bind("Id,Name,CountryId, JenkisAddress, GitAddress, ProvisionGitAddress, NexusFrontEndAddress, NexusProductAddress, BiometricProductAddress, Notes")] Project project) { if (ModelState.IsValid) { project.Active = 1; _context.Add(project); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["CountryId"] = new SelectList(_context.Country, "Id", "Id", project.CountryId); return(View(project)); }
public async Task <IActionResult> Create([Bind("Id,Name,RegionId")] Country country) { if (ModelState.IsValid) { country.Active = 1; _context.Add(country); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["RegionId"] = new SelectList(_context.Region, "Id", "Id", country.RegionId); return(View(country)); }
public Task Insert(Genre genre) { _context.Add(genre); return(_context.SaveChangesAsync()); }
public Task Insert(ShoppingCart shoppingCart) { _context.Add(shoppingCart); return(_context.SaveChangesAsync()); }
public Task Insert(Developer developer) { _context.Add(developer); return(_context.SaveChangesAsync()); }
public Task Insert(Platform platform) { _context.Add(platform); return(_context.SaveChangesAsync()); }
public Task Insert(Publisher publisher) { _context.Add(publisher); return(_context.SaveChangesAsync()); }
public Task Insert(User user) { _context.Add(user); return(_context.SaveChangesAsync()); }
public Task Insert(Review review) { _context.Add(review); return(_context.SaveChangesAsync()); }
public Task Insert(Game game) { _context.Add(game); return(_context.SaveChangesAsync()); }