public RestaurantCategory GetRestaurantCategory(int id) { //Condition.WithExceptionOnFailure<InvalidParameterException>() // .Requires(id, "restaurantCategoryID") // .IsNotNullOrEmpty(); return(_restaurantCategoryRepository.Get(id)); }
public RestaurantCategory GetRestaurantCategory(int id) { Condition.WithExceptionOnFailure <InvalidParameterException>() .Requires(_restaurantCategoryRepository, "_restaurantCategoryRepository") .IsNotNull(); return(_restaurantCategoryRepository.Get(id)); }