コード例 #1
0
        //[Authorize]
        public async Task <IHttpActionResult> Get(string id)
        {
            var error = string.Empty;

            LogManager.WriteLog("info", _User.Username, this.Request.RequestUri.PathAndQuery, JsonConvert.SerializeObject(_SessionInfo)).Forget();
            var user = DataClassesManager.GetUser(id, out error);

            if (!string.IsNullOrEmpty(error))
            {
                LogManager.WriteLog("error", "", this.Request.RequestUri.PathAndQuery, error).Forget();
                return(BadRequest());
            }

            return(Ok(user));
        }