public static void insert_Companie(string nume, int com, int admin) { var bd = new DataLayer.Models.ProiectBDContext(); Companie comp = new Companie { Nume = nume, ID_Comandant = com, ID_Administrator = admin }; bd.Companies.Add(comp); bd.Entry(comp).State = System.Data.Entity.EntityState.Added; bd.SaveChanges(); }