示例#1
0
        // POST: api/Subreddit
        public Task Post([FromBody] Models.Subreddit newSub)
        {
            string name = User.Identity.Name;
            //var ip = HttpContext.Current.GetOwinContext().Request.RemoteIpAddress;

            string ip = HttpContext.Connection.RemoteIpAddress.ToString();

            return(subBLL.AddSubreddit(newSub, name, ip));
        }