Beispiel #1
0
        public ActionResult locationview(int id = 0)
        {
            SampleDBContext1 dbo = new SampleDBContext1();


            PropertyDetail iy = new PropertyDetail();

            var zzz = (from u in dbo.PropertyDetails
                       where u.PropertyID.Equals(id)
                       select u).FirstOrDefault();


            zzz.Views = zzz.Views + 1;


            dbo.SaveChanges();


            PropertyDetail st = db.PropertyDetails.Find(id);

            return(View(st));
        }