connection strings will be used from the web.config of the site calling the communication layer. Unless you are using WCF then you will pull from there. As far as when to use linq. That is preference.
I used CRUD in the Data Layer.
I use Rules (Save this when or cancel or pull data just these records etc) in the BL.
I never use it in Presentation for purposes of modifying the data. I will to use it to tweak a already received list to show dynamically in Razor etc. BUt not CRUD, Basic data pulls etc.
Again. It's a question with 100000000000000 different replies. Its all preference and company rules.
Coding is like life, learn from the past and work towards the future, trying to redo past code, ends in lost time and nothing new accomplished.
onlychayan
Member
4 Points
38 Posts
In which layer LINQ sholud be used
Jun 26, 2012 04:09 PM|LINK
Among the Data access layer, Business layer and Presentation layer(.aspx page), in which layer LINQ shound be used.
Do we need to create data acces layer or retrive, update , delete data from Business layer using LINQ.
At the time of using LINQ where should I use connection string?
AWAlger
Contributor
2531 Points
540 Posts
Re: In which layer LINQ sholud be used
Jun 26, 2012 04:42 PM|LINK
connection strings will be used from the web.config of the site calling the communication layer. Unless you are using WCF then you will pull from there. As far as when to use linq. That is preference.
I used CRUD in the Data Layer.
I use Rules (Save this when or cancel or pull data just these records etc) in the BL.
I never use it in Presentation for purposes of modifying the data. I will to use it to tweak a already received list to show dynamically in Razor etc. BUt not CRUD, Basic data pulls etc.
Again. It's a question with 100000000000000 different replies. Its all preference and company rules.
Coding is like life, learn from the past and work towards the future, trying to redo past code, ends in lost time and nothing new accomplished.
Don't forget to mark Answer!!!!!!!
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: In which layer LINQ sholud be used
Jun 28, 2012 01:59 AM|LINK
Hi,
I prefer Data Access layer---- In fact LINQ is based on the Data Access (for it's generating CRUD methods with created model entities...)