I read many articles talk about 3 tiers architecture in c# but i see that:
Almost use Bussiness Logic Layer(BLL) as a object mapping corresponding table in database. This BLL object has some methods like these:
+
GetData()
: return this;+
Update(this)
;+
Insert(this)
;+
Delete(this)
;This BLL object calls corresponding DAL(Data Access Layer) to execute to corresponding table of database.
- I think if with above methods, we can oly get a record and update it. But if we have got many records and want to put it into a dataset, how can we update all records changed? Must we use loop for all records to do that?
- Moreover, in the database, there are many tables related to each other, so how can we put them into dataset, make relations and
add, update, delete records like using
BindingSource
with aCombobox
and aDataGridView
? And how can we seperate code in this situation?