예제 #1
0
 public void AddResturant(Resturant ResturantToAdd)
 {
     db.Add(ResturantToAdd);
 }
예제 #2
0
 public Restaurant Add(Restaurant newRestaurant)
 {
     _context.Add(newRestaurant); // SQL Server will generate the Id value for the restaurant.
     _context.SaveChanges();      // Saves changes to the database.
     return(newRestaurant);
 }
예제 #3
0
 public void Add(Restaurant restaurant)
 {
     _context.Add(restaurant);
     _context.SaveChanges();
 }