Application design question

I’ve got a web application with 3 layers: front, business and data.

I’m using linqToSql for retrieving my data from the db.

On the front end, I’d like to show the data that’s being pulled from the database.

In online examples all code is shown in the same layer. I’m wondering if it’s good design to put a reference to the linqtosql classes in my front end so I can bind the results to my gridview, or whether I should use a different way.

Since the user should be able to update the data, the easiest thing would be to use the gridview, connect it to the linq2sql datasource and bind it that way, but that would totally defeat my 3-layer structure.

Your Business layer should do the query and return and object to the UI layer. Then you bind to that object. Be it a List<T> or watever. That will stick to your 3-tier architecture.

That being said, that is a old architecture IMHO. Check out this: