NET Identity and also MVC5, I want to be able to extend the Post Action for Register so that it the user can be registered and also create a new entity of type Business which has a member of list of users, I want to add the user that has been created into that list.
I've tried a number of ways, and I'm unable to do this - I think I'm missing something fundamental.
Business business = new Business {name = "XYZ Pty Ltd"}
business.users.add(user)
db.Businesses.Add(business);
db.savechanges();
and also various other ways, such as after
var result = await UserManager.CreateAsync(user, model.Password);
Is this posible at all?