예제 #1
0
        public async Task <ActionResult <Employee> > SetEmployee(Employee newEmployee)
        {
            await _db.Employees.AddAsync(newEmployee);

            await _db.SaveChangesAsync();

            return(newEmployee);
        }
예제 #2
0
        public async Task <ActionResult <Member> > SetMember(Member newMember)
        {
            newMember.Password = Encript.Encrypt_user(newMember.Password);
            await _db.Members.AddAsync(newMember);

            await _db.SaveChangesAsync();

            return(newMember);
        }