Exemple #1
0
        public IActionResult UpdateViews(int id, int view)
        {
            var ent = Service.ByID(id);

            if (ent == null)
            {
                return(BadRequest());
            }

            if (view == 1)
            {
                ent.Views++;
                Service.Update(ent);
            }
            return(Ok());
        }