예제 #1
0
        public static void AddNewIspit(string sifra, string naziv)
        {
            using (OOPEntities context = new OOPEntities())
            {
                ispit i = new ispit();
                i.naziv = naziv;
                i.sifra = sifra;

                context.ispits.Add(i);
                context.SaveChanges();
            }
        }
예제 #2
0
        public static void DeleteIspit(int ispitId)
        {
            using (OOPEntities context = new OOPEntities())
            {
                ispit i = context.ispits.Where(x => x.ispit_id == ispitId).FirstOrDefault();

                if (i == null)
                {
                    return;
                }
                context.ispits.Remove(i);
                context.SaveChanges();
            }
        }