Ejemplo n.º 1
0
        public async Task <IActionResult> Create([Bind("EventID,EventTitle,EventDescription,EventDate")] Event @event)
        {
            if (ModelState.IsValid)
            {
                _context.Add(@event);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(@event));
        }
        public async Task <IActionResult> Create([Bind("MembersClassifiedsID,ClassifiedTitle,ClassifiedBody,PostDate,PostDuration")] MembersClassifieds membersClassifieds)
        {
            if (ModelState.IsValid)
            {
                _context.Add(membersClassifieds);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(membersClassifieds));
        }
        public async Task <IActionResult> Create([Bind("SermonID,SermonTitle,SermonLink,SermonDate")] Sermon sermon)
        {
            if (ModelState.IsValid)
            {
                _context.Add(sermon);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(sermon));
        }
        public async Task <IActionResult> Create([Bind("PrayerRequestID,RequestSubject,RequestBody,RequestDate")] PrayerRequest prayerRequest)
        {
            if (ModelState.IsValid)
            {
                _context.Add(prayerRequest);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(prayerRequest));
        }