Hoping someone can help me out here. I'm new to ASP, MVC and C# but trying to build a web application to learn it. I've created the default application that creates all the controllers, views etc for users and all works well.
I've now created a class and inside that class, I need to get the userID or user name of the logged in user. I've tried injecting UserManager and SignInManager into the constructor of the class but then any controllers calling that call complain that I'm not passing in the required parameters.
This may be cheeky but if someone has a basic example of how to retrieve something like the userID from inside a class, I could probably work backwards and understand what's going on. Been searching for hours on line but can't find any examples that work.
Using VS 2015 Asp Core Net RC2
Thanks