예제 #1
0
        public IActionResult Ocijeni(int clanID, int ocjena, int teretanaID)
        {
            MyContext      db   = new MyContext();
            OcjenaTeretane nova = new OcjenaTeretane()
            {
                ClanID     = clanID,
                TeretanaID = teretanaID,
                Ocjena     = ocjena
            };

            db.OcjenaTeretane.Add(nova);
            db.SaveChanges();

            return(RedirectToAction("Prikaz"));
        }
예제 #2
0
        public int OcijeniTest(int clanID, int ocjena, int teretanaID)
        {
            MyContext      db   = new MyContext();
            OcjenaTeretane nova = new OcjenaTeretane()
            {
                ClanID     = clanID,
                TeretanaID = teretanaID,
                Ocjena     = ocjena
            };

            db.OcjenaTeretane.Add(nova);
            db.SaveChanges();

            int Ocjena = ocjena;

            return(Ocjena);
        }