public async Task <ActionResult <Employee> > SetEmployee(Employee newEmployee) { await _db.Employees.AddAsync(newEmployee); await _db.SaveChangesAsync(); return(newEmployee); }
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); }