コード例 #1
0
 public void Modificar(DB.Restaurante _restaurante, byte[] image)
 {
     DB.Restaurante old_restaurante = db.Restaurante.Find(_restaurante.RestauranteId);
     old_restaurante.NombreRestaurante = _restaurante.NombreRestaurante;
     old_restaurante.HoraApertura      = _restaurante.HoraApertura;
     old_restaurante.HoraCierre        = _restaurante.HoraCierre;
     old_restaurante.Logo = image;
     db.SaveChanges();
 }
コード例 #2
0
 public void AgregarRestaurante(DB.Restaurante _restaurante, byte[] image)
 {
     DB.Restaurante new_restaurante = new DB.Restaurante();
     new_restaurante.NombreRestaurante = _restaurante.NombreRestaurante;
     new_restaurante.HoraApertura      = _restaurante.HoraApertura;
     new_restaurante.HoraCierre        = _restaurante.HoraCierre;
     new_restaurante.Logo = image;
     db.Restaurante.Add(new_restaurante);
     db.SaveChanges();
 }