public void EditRestaurant(Library.Restaurant restaurant) { if (_db.Restaurant.Find(restaurant.RestaurantId) != null) { _db.Restaurant.Update(RestaurantMapper.Map(restaurant)); } }
public IEnumerable <Library.Restaurant> GetRestaurant() { return(_db.Restaurant.Select(x => RestaurantMapper.Map(x))); }
public Library.Restaurant GetRestaurantByRestaurantId(int id) { var Restaurant = _db.Restaurant.Where(x => x.RestaurantId == id).FirstOrDefault(); return(RestaurantMapper.Map(Restaurant)); }
public void AddRestaurant(Library.Restaurant restaurant) { _db.Restaurant.Add(RestaurantMapper.Map(restaurant)); }