public async Task <User> AddUser(UserForManipulation user) { User newUser = new User { UserName = user.UserName, FullName = user.FullName }; db.Users.Add(newUser); await db.SaveChangesAsync(); return(newUser); }
public async Task UpdateUser(UserForManipulation newUser, User oldUser) { oldUser.UserName = newUser.UserName; oldUser.FullName = newUser.FullName; await db.SaveChangesAsync(); }