How to send data at Business Logic layer by repository pattern
Core--> interfaces, entities, helpers, constants etc
Data-->responsible for fetching data from DB. mostly returns DataTable
DataSets--> if m using LINQ, this would be the DataContext
Service--> Converts DataTable etc into Entities .
Application --> Knows how to deal with entities .
show them manipulate them send them back and forth .
insert data using Service layer .
If you find this pattern more flexible .. you could write multiple Data layers that could fetch data from more than one kind of DB and use what you want.
If you want to write Data layer that targets more than one kind of DB types (Oracle, Sql, MySql) with little code change then you can use the provider pattern.
Core--> interfaces, entities, helpers, constants etc
Data-->responsible for fetching data from DB. mostly returns DataTable
DataSets--> if m using LINQ, this would be the DataContext
Service--> Converts DataTable etc into Entities .
Application --> Knows how to deal with entities .
show them manipulate them send them back and forth .
insert data using Service layer .
If you find this pattern more flexible .. you could write multiple Data layers that could fetch data from more than one kind of DB and use what you want.
If you want to write Data layer that targets more than one kind of DB types (Oracle, Sql, MySql) with little code change then you can use the provider pattern.
0 comments:
Post a Comment