0
我想弄清楚如何使用.NET后端从我的移动服务中登录。到目前为止,我读过,你可以这样做致电:Azure移动服务中的日志错误
ApiController.ApiServices.Log.Info("log string")
这是好的,如果你是在ApiController,你可以简单地使用this.Services
,但你会怎么做,如果你想从登录除了控制器之外的某处?这甚至有可能吗?
我想弄清楚如何使用.NET后端从我的移动服务中登录。到目前为止,我读过,你可以这样做致电:Azure移动服务中的日志错误
ApiController.ApiServices.Log.Info("log string")
这是好的,如果你是在ApiController,你可以简单地使用this.Services
,但你会怎么做,如果你想从登录除了控制器之外的某处?这甚至有可能吗?
如果“除了控制器”你在自定义控制器的意思是,你可以声明
public ApiServices Services { get; set; }
,然后使用Services.Log.Error("your error")
如果这是你问不是,请给一些更多信息。