I want to insert user id to multiple tables after registration success
public async Task Register(RegisterViewModel model , RoleViewModel
You instantiate the ApplicationDbContext context but you don't use it.
You then use entities but where does that come from?
With only the controller code shown here, my guess is you should do:
context.activities.Add(activity);
context.SaveChanges();
Finally, you pass in RoleViewModel role but you don't use it. Maybe you can remove that?