// To protect from overposting attacks, enable the specific properties you want to bind to, for // more details, see https://aka.ms/RazorPagesCRUD. public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } _context.Attach(StatusResistance).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!StatusResistanceExists(StatusResistance.CharacterId)) { return(NotFound()); } else { throw; } } return(RedirectToPage("./Index")); }
// To protect from overposting attacks, enable the specific properties you want to bind to, for // more details, see https://aka.ms/RazorPagesCRUD. public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } _context.Guilds.Add(Guild); await _context.SaveChangesAsync(); return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } Guild = await _context.Guilds.FindAsync(id); if (Guild != null) { _context.Guilds.Remove(Guild); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } CharacterStat = await _context.CharacterStats.FindAsync(id); if (CharacterStat != null) { _context.CharacterStats.Remove(CharacterStat); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } AdventureBook = await _context.AdventureBooks.FindAsync(id); if (AdventureBook != null) { _context.AdventureBooks.Remove(AdventureBook); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } StatusResistance = await _context.StatusResistances.FindAsync(id); if (StatusResistance != null) { _context.StatusResistances.Remove(StatusResistance); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
// To protect from overposting attacks, enable the specific properties you want to bind to, for // more details, see https://aka.ms/RazorPagesCRUD. public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } _context.UserInfos.Add(UserInfo); _context.AdventureBooks.Add(AdventureBook); _context.CharacterStats.Add(CharacterStat); _context.ClassStats.Add(ClassStat); _context.Equipments.Add(Equipment); _context.GoddessPrayers.Add(GoddessPrayer); _context.Guilds.Add(Guild); _context.StatusResistances.Add(StatusResistance); await _context.SaveChangesAsync(); return(RedirectToPage("./Index")); }