示例#1
0
        public static void insert_CDT_Comp(string nume, string prenume, int grad)
        {
            var      bd  = new DataLayer.Models.ProiectBDContext();
            CDT_Comp cdt = new CDT_Comp
            {
                Nume    = nume,
                Prenume = prenume,
                ID_Grad = grad
            };

            bd.CDT_Comp.Add(cdt);
            bd.Entry(cdt).State = System.Data.Entity.EntityState.Added;
            bd.SaveChanges();
        }
示例#2
0
        public static void insert_CDT_Comp(string nume, string prenume, int grad)
        {
            var bd = new DataLayer.Models.ProiectBDContext();
            CDT_Comp cdt = new CDT_Comp
            {
                Nume = nume,
                Prenume = prenume,
                ID_Grad = grad
            };

            bd.CDT_Comp.Add(cdt);
            bd.Entry(cdt).State = System.Data.Entity.EntityState.Added;
            bd.SaveChanges();
        }