예제 #1
0
        public static void insert_Preturi(string nume, double pret, DateTime data)
        {
            var bd = new DataLayer.Models.ProiectBDContext();

            Preturi pr = new Preturi
            {
                Nume = nume,
                Pret = pret,
                Data = data
            };

            bd.Preturis.Add(pr);
            bd.Entry(pr).State = System.Data.Entity.EntityState.Added;
            bd.SaveChanges();
        }
예제 #2
0
        public static void insert_Preturi(string nume, double pret, DateTime data)
        {
            var bd = new DataLayer.Models.ProiectBDContext();

            Preturi pr = new Preturi
            {
                Nume = nume,
                Pret = pret,
                Data = data
            };

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