Ejemplo n.º 1
0
 public void UpdateRealtor(int ID, string name, string phoneNR)
 {
     using (var database = new EstateBrokerContext())
     {
         Realtor realtor = database.Realtors.Find(ID);
         realtor.Name    = name;
         realtor.PhoneNR = phoneNR;
         database.SaveChanges();
     }
 }
Ejemplo n.º 2
0
        public void CreateRealtor(string name, string phoneNR)
        {
            var database = new EstateBrokerContext();

            var realtor = new Realtor()
            {
                Name    = name,
                PhoneNR = phoneNR
            };

            database.Realtors.Add(realtor);
            database.SaveChanges();
        }