コード例 #1
0
 public void EditRestaurant(Library.Restaurant restaurant)
 {
     if (_db.Restaurant.Find(restaurant.RestaurantId) != null)
     {
         _db.Restaurant.Update(RestaurantMapper.Map(restaurant));
     }
 }
コード例 #2
0
 public IEnumerable <Library.Restaurant> GetRestaurant()
 {
     return(_db.Restaurant.Select(x => RestaurantMapper.Map(x)));
 }
コード例 #3
0
        public Library.Restaurant GetRestaurantByRestaurantId(int id)
        {
            var Restaurant = _db.Restaurant.Where(x => x.RestaurantId == id).FirstOrDefault();

            return(RestaurantMapper.Map(Restaurant));
        }
コード例 #4
0
 public void AddRestaurant(Library.Restaurant restaurant)
 {
     _db.Restaurant.Add(RestaurantMapper.Map(restaurant));
 }