I have seen this code very often.
Why is there a null check for the _AppRoleManager? Why not just return AppRoleManager?
public class BaseApiController : ApiController
{
//Code removed from brevity
private ApplicationRoleManager _AppRoleManager = null;
protected ApplicationRoleManager AppRoleManager
{
get
{
return _AppRoleManager ?? Request.GetOwinContext().GetUserManager<ApplicationRoleManager>();
}
}
}