我試圖減少存在於我的asp.net web窗體中的代碼重複。這是從數據庫加載的示例對象的樣子。 Apartment
int id
decimal rent
bool callForPricing
int squareFeet
int beds
int baths
現在我在幾個不同的asp.net頁面(即有多個公寓的列表,一個詳細視圖等
我參與了一個項目,該項目使用Presenter模式。 我沒有看到它的好處,因爲演示類的所有方法都是微不足道的,就像這樣: class Checkout::NewPresenter
def initialize(customer, order)
@customer, @order = customer, order
end
def customer