Esempio n. 1
0
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            _context.Attach(AgreedMeeting).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!AgreedMeetingExists(AgreedMeeting.AgreedMeetingID))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(RedirectToPage("./Index"));
        }
Esempio n. 2
0
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            _context.AgreedMeeting.Add(AgreedMeeting);
            await _context.SaveChangesAsync();

            return(RedirectToPage("./Index"));
        }
Esempio n. 3
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            AgreedMeeting = await _context.AgreedMeeting.FindAsync(id);

            if (AgreedMeeting != null)
            {
                _context.AgreedMeeting.Remove(AgreedMeeting);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }