Example #1
0
        public Member Add_Members(Member data)
        {
            _context.Add(data);
            _context.SaveChanges();

            return(data);
        }
Example #2
0
        public async Task <IActionResult> Create([Bind("Id,FName,LName,CClassification,skill")] Member member)
        {
            if (ModelState.IsValid)
            {
                _context.Add(member);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(member));
        }
Example #3
0
        public async Task <IActionResult> Create([Bind("Id,Name,Emai,Birth,Married,Memo,DateTime")] Member member)
        {
            if (ModelState.IsValid)
            {
                _context.Add(member);
                await _context.SaveChangesAsync();

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