예제 #1
0
        public IActionResult YorumUpdaten([FromBody] Yorum yorum)
        {
            yorum.UpdatedUserId = HttpContext.User.Identity.Name;
            string url = Environment.GetEnvironmentVariable("ApiUrl");

            url += "api/yorum/YorumUpdate/";
            HttpApiHelper helper   = new HttpApiHelper(url, "PUT");
            string        response = helper.GetResponseWithModel(JsonConvert.SerializeObject(yorum));

            return(RedirectToAction("MakaleGet", "Makale", new { id = yorum.MakaleId }));
        }
예제 #2
0
        public IActionResult MakaleAdd(Makale makale)
        {
            makale.CreatedUserId = HttpContext.User.Identity.Name;
            string url = Environment.GetEnvironmentVariable("ApiUrl");

            url += "api/makale/PostMakale/";
            HttpApiHelper helper   = new HttpApiHelper(url, "POST");
            string        response = helper.GetResponseWithModel(JsonConvert.SerializeObject(makale));

            //Makale makaleadd = JsonConvert.DeserializeObject<Makale>(response);
            return(RedirectToAction("MakaleHomePage"));
        }