I have the following setup for a simple application:
generated LINQ to SQL classes from my database tables (DAL?)
created classes (BLL?) that use the LINQ to SQL datacontext, to insert, update, delete, select
in my presentation layer, when inserting e.g. a new "product", I'm creating a new instance of object "Product", which comes from my DAL layer (this is what LINQ to SQL created for me)
My question is if this is the right way to go for separation of layers in this case. What's strange to me is that I'm using an object type that was defined in the DAL, which shouldn't be used in the presentation layer if you ask me. But if I want to make use of the LINQ to SQL objects without again creating new objects, this seemed like the way to go.
What's your advice on this? I'm not sure what's the best way to go about here.